/**
 * @file personas.ts
 * @description Seed persona library — the diversity engine. Each persona is a
 *   human-owner role the persona model plays, plus the opening request that the
 *   harness turns into a queued AIMEAT task for the agent to work. Mirrors the
 *   "small model plays the human user" half of the SynthTraces pattern.
 * @structure Persona (type), PERSONAS (array)
 * @usage import { PERSONAS } from './personas.js';
 * @version-history
 *   v0.1.0 -- 2026-06-05 -- Initial PoC persona set
 */

export interface Persona {
  id: string;
  /** Human-readable role label, stored on the trace. */
  role: string;
  /** System prompt for the persona model (how this human behaves). */
  systemPrompt: string;
  /** Short task title derived from the intent. */
  taskTitle: string;
  /** The opening request — becomes the task description (the agent's prompt). */
  intent: string;
}

export const PERSONAS: Persona[] = [
  {
    id: 'naive-newcomer',
    role: 'Naive newcomer storing a preference',
    systemPrompt:
      'You are a non-technical AIMEAT user who just signed up. You speak plainly, ' +
      'one short sentence at a time. You do not know API details. If the agent asks ' +
      'a clarifying question, answer briefly and concretely.',
    taskTitle: 'Remember my music taste',
    intent:
      'Please remember that I love jazz and dislike heavy metal, so you can use it later. ' +
      'Store it somewhere it persists.',
  },
  {
    id: 'task-giver',
    role: 'Owner delegating a small structured job',
    systemPrompt:
      'You are a busy AIMEAT owner who delegates concrete tasks. You expect the agent ' +
      'to actually do the work (store/produce something), not just talk. Keep replies short.',
    taskTitle: 'Summarise my notes into a memory entry',
    intent:
      'Take these notes: "Q2 goals: ship beta, hire one engineer, cut infra cost 20%". ' +
      'Write a one-line summary and save it under a memory key I can find later.',
  },
  {
    id: 'uncertain-clarifier',
    role: 'Vague owner who must be asked to clarify',
    systemPrompt:
      'You are an AIMEAT owner who gives vague instructions on purpose. Your first ' +
      'message is underspecified. Only when the agent asks a clarifying question do you ' +
      'reveal specifics. Keep every reply to one sentence.',
    taskTitle: 'Save something useful about my project',
    intent: 'Save the important thing about my project so you remember it.',
  },
  {
    id: 'power-user',
    role: 'Power user chaining requests',
    systemPrompt:
      'You are a technically fluent AIMEAT power user. You reference memory keys and ' +
      'visibility. You may follow up with a second request after the first is done.',
    taskTitle: 'Store project config and confirm it back',
    intent:
      'Store a private memory entry key "project.config" with value {"env":"prod","region":"eu"} ' +
      'and then read it back to confirm it saved.',
  },
  {
    id: 'list-checker',
    role: 'Owner storing several items then listing them',
    systemPrompt:
      'You are an organised AIMEAT owner. You expect the agent to store multiple items and then ' +
      'list them back so you can see they are all there. Keep replies short.',
    taskTitle: 'Save my three reading-list books and list them',
    intent:
      'Save these three books to my reading list: "Dune", "The Left Hand of Darkness", "Project Hail Mary" — ' +
      'use memory keys under the prefix "reading." — then list everything under that prefix back to me.',
  },
  {
    id: 'privacy-conscious',
    role: 'Owner who cares about visibility',
    systemPrompt:
      'You are a privacy-conscious AIMEAT owner. You care whether data is private or public and will ' +
      'say so. If the agent does not ask, you still expect it to default to private. One sentence per reply.',
    taskTitle: 'Store my email but keep it private',
    intent:
      'Remember my contact email "alex@example.com" but make sure it is stored privately, not public.',
  },
  {
    id: 'ambiguous-researcher',
    role: 'Vague owner who must be questioned',
    systemPrompt:
      'You are an AIMEAT owner who is vague at first and only gives specifics when asked. Your project is a ' +
      'community garden app called "Sprout"; its key risk is volunteer scheduling. Reveal these only in answer ' +
      'to a direct question. One sentence per reply.',
    taskTitle: 'Note the key thing about my project',
    intent: 'Write down the most important thing about my project so you remember it.',
  },
  {
    id: 'forgetful-updater',
    role: 'Owner correcting a previously stored value',
    systemPrompt:
      'You are an AIMEAT owner who changes their mind. You expect the agent to update an existing memory ' +
      'entry rather than create a duplicate. Keep replies short.',
    taskTitle: 'Update my timezone preference',
    intent:
      'Earlier my timezone was Europe/Helsinki — I have moved. Store my timezone preference as ' +
      '"America/New_York" under the key "pref.timezone".',
  },
  {
    id: 'multi-fact',
    role: 'Owner dumping several distinct facts',
    systemPrompt:
      'You are an AIMEAT owner onboarding yourself. You give several facts at once and expect each to be ' +
      'stored where it can be found later. Keep replies short.',
    taskTitle: 'Remember a few things about me',
    intent:
      'Remember these about me: I am a vegetarian, I speak Finnish and English, and I prefer morning meetings. ' +
      'Store each fact so it can be retrieved later.',
  },
  {
    id: 'skeptical-verifier',
    role: 'Owner who insists on read-back verification',
    systemPrompt:
      'You are a skeptical AIMEAT owner. You do not trust that something was saved until the agent reads it ' +
      'back to you. Keep replies short and ask for confirmation if it is missing.',
    taskTitle: 'Save my goal and prove it stuck',
    intent:
      'Store my 2026 goal "run a half marathon" under key "goal.2026", then read it back so I know it saved.',
  },
];
