// AI Labs data — sponsor-backed pre-built AIOps templates, community posts, news, and FAQ items.

const RAOR_PHASES = [
  {
    id: 'recognize', label: 'RECOGNIZE', step: 1,
    color: '#dc2626', soft: '#fef2f2', ink: '#7f1d1d',
    blurb: 'Spot the signal worth investigating.',
    detail: 'Outer ring catches an idea from the world: a paper, a market move, a customer pain.',
  },
  {
    id: 'acquire', label: 'ACQUIRE', step: 2,
    color: '#ea580c', soft: '#fff7ed', ink: '#7c2d12',
    blurb: 'Pull the right context in.',
    detail: 'Datasets, repos, sponsor KBs, MCP tools — locked into the rotating frame.',
  },
  {
    id: 'organize', label: 'ORGANIZE · REFLECT', step: 3,
    color: '#eab308', soft: '#fefce8', ink: '#713f12',
    blurb: 'Inner gear turns. Patterns emerge.',
    detail: 'Lions cluster, debate, refine. Action Graph crystallises into hypotheses.',
  },
  {
    id: 'apply', label: 'APPLY · AMPLIFY', step: 4,
    color: '#f59e0b', soft: '#fffbeb', ink: '#78350f',
    blurb: 'Pen meets paper. Ship the experiment.',
    detail: 'Deploy a runnable lab. Telemetry feeds the next loop back to RECOGNIZE.',
  },
];

const SPONSOR_LABS = [
  {
    id: 'xai-supergrok',
    name: 'SuperGrok Voltron Castle',
    sponsor: 'xAI',
    sponsorMark: 'X',
    sponsorColor: '#18181b',
    accent: '#18181b',
    accentSoft: '#fafafa',
    accentInk: '#27272a',
    tag: 'AIOps Community',
    family: 'grok-4',
    blurb: 'Single-family Voltron stack running entirely on Grok-4. Real-time web crawl, X firehose, deep KB pre-loaded with the latest research drops.',
    bullets: [
      'All 5 Lions on Grok-4 · uniform reasoning surface',
      'Live X / web grounding for Green Lion',
      'Real-time research crystallisation from arXiv & papers-with-code',
    ],
    podsIncluded: 28,
    kbGB: 142,
    tokenGrant: 4_500_000,
    seats: 240,
    seatsTaken: 187,
    dataSharing: 'optional',
    spinupSec: 90,
    tagline: 'Latest. Realest. Loudest.',
    featured: true,
    badge: { text: 'NEW · live', color: '#dc2626' },
  },
  {
    id: 'yc-claude',
    name: 'YC G-Stack',
    sponsor: 'Y Combinator',
    sponsorMark: 'YC',
    sponsorColor: '#f97316',
    accent: '#f97316',
    accentSoft: '#fff7ed',
    accentInk: '#7c2d12',
    tag: 'Founder Lab',
    family: 'claude-sonnet-4.5',
    blurb: 'Full G-stack (Growth · Go-to-market · Governance) preset, every Lion on Claude Sonnet 4.5. Loaded with YC playbooks, batch interviews, and Founder Bible.',
    bullets: [
      'Claude Sonnet 4.5 + Haiku tier for speed',
      'YC Library + Bookface threads as Green Lion KB',
      'Demo Day pitch loop pre-wired',
    ],
    podsIncluded: 22,
    kbGB: 84,
    tokenGrant: 3_000_000,
    seats: 500,
    seatsTaken: 411,
    dataSharing: 'required',
    spinupSec: 75,
    tagline: 'For the next batch.',
    featured: true,
    badge: { text: 'W26 cohort', color: '#f97316' },
  },
  {
    id: 'anthropic-charter',
    name: 'Charter Lab',
    sponsor: 'Anthropic',
    sponsorMark: 'A',
    sponsorColor: '#d97706',
    accent: '#d97706',
    accentSoft: '#fffbeb',
    accentInk: '#78350f',
    tag: 'Alignment-first',
    family: 'claude-opus-5',
    blurb: 'Constitution-driven stack. Yellow Lion takes lead; every action passes through a steering-vector policy gate before reaching Red.',
    bullets: [
      'CAST steering vectors enabled by default',
      'Multi-model vote (Sonnet/Opus/Haiku) on TIER-2 actions',
      'Public audit log for every veto',
    ],
    podsIncluded: 24,
    kbGB: 96,
    tokenGrant: 2_500_000,
    seats: 180,
    seatsTaken: 94,
    dataSharing: 'optional',
    spinupSec: 110,
    tagline: 'Helpful, harmless, on rails.',
    badge: { text: 'safety-first', color: '#d97706' },
  },
  {
    id: 'gemini-deepmind',
    name: 'Gemini Long Context Lab',
    sponsor: 'Google DeepMind',
    sponsorMark: 'G',
    sponsorColor: '#3b82f6',
    accent: '#3b82f6',
    accentSoft: '#eff6ff',
    accentInk: '#1e3a8a',
    tag: 'Multimodal RAG',
    family: 'gemini-2.5-pro',
    blurb: 'Green Lion gets 2M-token windows + native video/image grounding. Great for codebase-wide refactors and long document analysis.',
    bullets: [
      '2M context across every Lion call',
      'Video, image, audio in Action Graph',
      'Veo + Imagen tool calls pre-wired',
    ],
    podsIncluded: 19,
    kbGB: 210,
    tokenGrant: 5_000_000,
    seats: 120,
    seatsTaken: 73,
    dataSharing: 'optional',
    spinupSec: 60,
    tagline: 'See everything at once.',
    badge: { text: '2M ctx', color: '#3b82f6' },
  },
  {
    id: 'mistral-sovereign',
    name: 'Sovereign EU Lab',
    sponsor: 'Mistral',
    sponsorMark: 'M',
    sponsorColor: '#7c3aed',
    accent: '#7c3aed',
    accentSoft: '#f5f3ff',
    accentInk: '#4c1d95',
    tag: 'Air-gapped',
    family: 'mistral-large-3',
    blurb: 'Castle runs entirely on EU servers (or your hardware). Zero data leaves the perimeter. GDPR-clean, AI-Act-aware.',
    bullets: [
      '100% on-prem or eu-west-3',
      'No telemetry, no sponsor visibility',
      'Mistral Large 3 + Codestral for Blue Lion',
    ],
    podsIncluded: 18,
    kbGB: 48,
    tokenGrant: 1_500_000,
    seats: 320,
    seatsTaken: 138,
    dataSharing: 'never',
    spinupSec: 140,
    tagline: 'Stays in the perimeter.',
    badge: { text: 'GDPR · clean', color: '#7c3aed' },
  },
  {
    id: 'meta-llama-open',
    name: 'Llama Open Lab',
    sponsor: 'Meta AI',
    sponsorMark: 'L',
    sponsorColor: '#0ea5e9',
    accent: '#0ea5e9',
    accentSoft: '#f0f9ff',
    accentInk: '#0c4a6e',
    tag: 'Fine-tunable',
    family: 'llama-4-maverick',
    blurb: 'Open weights + LoRA training loop wired into Blue Lion. Branch the model from your own dataset in one click.',
    bullets: [
      'Llama 4 weights pre-pulled',
      'LoRA + QLoRA training Action available',
      'Pushes back to HuggingFace on commit',
    ],
    podsIncluded: 16,
    kbGB: 62,
    tokenGrant: 3_500_000,
    seats: 400,
    seatsTaken: 312,
    dataSharing: 'optional',
    spinupSec: 95,
    tagline: 'Your weights, your loop.',
    badge: { text: 'open weights', color: '#0ea5e9' },
  },
  {
    id: 'openai-gpt5',
    name: 'GPT-5 Reasoner Lab',
    sponsor: 'OpenAI',
    sponsorMark: 'O',
    sponsorColor: '#10a37f',
    accent: '#10a37f',
    accentSoft: '#ecfdf5',
    accentInk: '#064e3b',
    tag: 'Frontier reasoning',
    family: 'gpt-5',
    blurb: 'Frontier reasoning across Black + Green. o-series planner for deep math/code chains. Best for hard research questions.',
    bullets: [
      'GPT-5 + o4-mini fallback',
      'Deep-think mode on by default',
      'Realtime code interpreter for Blue Lion',
    ],
    podsIncluded: 21,
    kbGB: 74,
    tokenGrant: 2_800_000,
    seats: 280,
    seatsTaken: 244,
    dataSharing: 'optional',
    spinupSec: 80,
    tagline: 'Think harder.',
    badge: { text: 'reasoning', color: '#10a37f' },
  },
  {
    id: 'cohere-enterprise',
    name: 'Command-R Enterprise',
    sponsor: 'Cohere',
    sponsorMark: 'C',
    sponsorColor: '#ec4899',
    accent: '#ec4899',
    accentSoft: '#fdf2f8',
    accentInk: '#831843',
    tag: 'Enterprise RAG',
    family: 'command-r-plus-3',
    blurb: 'Enterprise-tuned RAG with citation guarantees. Multi-tenant, BYOC, SOC2 Type II out of the box.',
    bullets: [
      'Citation-required output mode',
      'Multi-tenant + SSO/SCIM',
      'Connectors: SharePoint, Confluence, Slack',
    ],
    podsIncluded: 17,
    kbGB: 120,
    tokenGrant: 2_000_000,
    seats: 90,
    seatsTaken: 51,
    dataSharing: 'required',
    spinupSec: 105,
    tagline: 'For the procurement team.',
    badge: { text: 'SOC2', color: '#ec4899' },
  },
];

// Community feed — research, news, posts
const COMMUNITY_POSTS = [
  {
    id: 'p1', kind: 'paper',
    title: 'CAST: Conditional Activation Steering for Multi-Agent Governance',
    venue: 'arXiv · cs.AI',
    posted: '4h ago',
    author: 'Wen et al.',
    excerpt: 'Demonstrates 73% reduction in unsafe tool calls when Yellow-Lion-style policy gates use CAST vectors instead of prompt-only rules.',
    tags: ['steering', 'governance', 'multi-agent'],
    relatedLabs: ['anthropic-charter', 'mistral-sovereign'],
    hot: true,
  },
  {
    id: 'p2', kind: 'announcement',
    title: 'xAI ships Grok-4 with native MCP gateway',
    venue: 'x.com/xai',
    posted: '11h ago',
    author: '@xai',
    excerpt: 'New MCP support means SuperGrok Castle can federate tool calls without the local-mcp shim. Spin-up time dropped from 140s to 90s.',
    tags: ['grok', 'mcp', 'realtime'],
    relatedLabs: ['xai-supergrok'],
    hot: true,
  },
  {
    id: 'p3', kind: 'community',
    title: 'YC W26 batch is 90% on Claude — what changed?',
    venue: 'Bookface',
    posted: '1d ago',
    author: 'Aysha K.',
    excerpt: 'A short thread on tool-use reliability, sandboxed exec quality, and why the founders all migrated off OpenRouter mid-batch.',
    tags: ['yc', 'claude', 'tool-use'],
    relatedLabs: ['yc-claude'],
  },
  {
    id: 'p4', kind: 'paper',
    title: 'Long-context evals: Gemini 2.5 Pro vs. needle-in-haystack at 2M',
    venue: 'arXiv · cs.CL',
    posted: '2d ago',
    author: 'Park & Chen',
    excerpt: 'Recall stays >94% at 1.8M tokens. Implications for replacing chunked RAG with single-pass retrieval in research labs.',
    tags: ['gemini', 'long-context', 'rag'],
    relatedLabs: ['gemini-deepmind'],
  },
  {
    id: 'p5', kind: 'news',
    title: 'EU AI Act enforcement begins Q3 — what changes for AIOps stacks',
    venue: 'EU Commission',
    posted: '3d ago',
    author: 'AB news desk',
    excerpt: 'High-risk classification triggers mandatory audit logs + human-in-the-loop. Sovereign EU Lab is one of three pre-certified templates.',
    tags: ['compliance', 'eu-ai-act', 'audit'],
    relatedLabs: ['mistral-sovereign'],
  },
  {
    id: 'p6', kind: 'community',
    title: 'Open weights are winning the LoRA economy',
    venue: 'HuggingFace blog',
    posted: '4d ago',
    author: 'M. Reyes',
    excerpt: 'Llama 4 LoRA hub passed 80k checkpoints. We benchmark Blue Lion fine-tunes from 8 published research labs.',
    tags: ['llama', 'lora', 'open-weights'],
    relatedLabs: ['meta-llama-open'],
  },
  {
    id: 'p7', kind: 'paper',
    title: 'Proof-of-Thought: cryptographic attestation of agent reasoning chains',
    venue: 'arXiv · cs.CR',
    posted: '5d ago',
    author: 'Kapoor et al.',
    excerpt: 'Proposes signed Merkle trees of CoT steps. Black Lion debrief becomes verifiable. Charter Lab implements the v0 spec.',
    tags: ['cryptography', 'attestation', 'cot'],
    relatedLabs: ['anthropic-charter'],
  },
];

const LAB_CATEGORIES = [
  { id: 'reasoning', label: 'Reasoning',      icon: 'Brain',   blurb: 'Deep planning + long math/code chains.', ids: ['openai-gpt5', 'xai-supergrok', 'anthropic-charter'] },
  { id: 'rag',       label: 'RAG / research', icon: 'Database', blurb: 'Grounded retrieval with citation guarantees.', ids: ['gemini-deepmind', 'cohere-enterprise', 'anthropic-charter', 'xai-supergrok'] },
  { id: 'open',      label: 'Open weights',   icon: 'Code',    blurb: 'Branch and fine-tune from your own data.', ids: ['meta-llama-open', 'mistral-sovereign'] },
  { id: 'sovereign', label: 'Sovereign',      icon: 'Shield',  blurb: 'Air-gapped, in-perimeter, compliance-clean.', ids: ['mistral-sovereign', 'anthropic-charter'] },
];

// ActionBoard team-tuned boards — proven ops boards already distilled onto a
// tuned action-model, published by the ActionBoard team. Mock records.
const TEAM_TUNED_BOARDS = [
  { id: 'inbox-zero',  name: 'Inbox Zero Ops',    tag: 'Comms',     base: 'claude-sonnet-4.5', tuned: 'ab-inbox-v3',     saved: 89, runs: '12.4k', accent: '#6d28d9', pods: ['triage', 'draft', 'send'],       blurb: 'Triage, draft, and clear a shared inbox on a distilled action-model — escalates only the edge cases.' },
  { id: 'growth-pipe', name: 'Growth Pipeline',   tag: 'GTM',       base: 'gpt-5',             tuned: 'ab-growth-v2',    saved: 84, runs: '8.1k',  accent: '#0284c7', pods: ['enrich', 'score', 'route'],      blurb: 'Enrich, score, and route inbound the way your best rep would — the board learned the rubric.' },
  { id: 'incident',    name: 'Incident Commander', tag: 'SRE',      base: 'claude-opus-5',     tuned: 'ab-incident-v4',  saved: 91, runs: '3.7k',  accent: '#e11d48', pods: ['detect', 'diagnose', 'mitigate'], blurb: 'Detect, diagnose, and mitigate from your runbooks — Yellow Lion gates every outbound fix.' },
  { id: 'research',    name: 'Research Digest',    tag: 'Research', base: 'gemini-2.5-pro',    tuned: 'ab-digest-v2',    saved: 87, runs: '5.9k',  accent: '#059669', pods: ['crawl', 'cluster', 'brief'],     blurb: 'Crawl, cluster, and brief the week\'s drops into one action-ready digest on your own model.' },
];

const LAB_FILTERS = [
  { id: 'all',       label: 'All labs',     count: SPONSOR_LABS.length },
  { id: 'featured',  label: 'Featured',     count: SPONSOR_LABS.filter(l => l.featured).length },
  { id: 'reasoning', label: 'Reasoning',    count: 3 },
  { id: 'rag',       label: 'RAG / research', count: 4 },
  { id: 'open',      label: 'Open weights', count: 2 },
  { id: 'sovereign', label: 'Sovereign',    count: 2 },
];

// Generic lab setup flow — the companion personalizes each step to the chosen lab
const SETUP_STEPS = [
  { title: 'Pick your lab', body: 'Choose a sponsor lab whose model family and token grant match your goal.' },
  { title: 'Set data-sharing', body: 'Agree or decline anonymised telemetry. On an optional lab, declining drops the grant to 25%.' },
  { title: 'Accept the terms', body: 'Review the sponsor Experimenter Agreement and the ActionBoard Charter, then tick to accept.' },
  { title: 'Deploy the Castle', body: 'One click spins up the pods, indexes the knowledge base, and grants your tokens.' },
  { title: 'Form Voltron, run RAOARA', body: 'The five Lions form up — run your first Recognize \u2192 Adapt loop end-to-end.' },
];

const SUGGESTED_PROMPTS = [
  'How do I set up my first lab?',
  'Walk me through deploying the SuperGrok lab',
  'What happens to my grant if I decline data-sharing?',
  'Which lab fits a sovereign, GDPR-clean deploy?',
];

Object.assign(window, {
  RAOR_PHASES, SPONSOR_LABS, COMMUNITY_POSTS, LAB_FILTERS, LAB_CATEGORIES, TEAM_TUNED_BOARDS, SUGGESTED_PROMPTS, SETUP_STEPS,
});
