import type { AiJobType } from '@insignia/iios-contracts';

/**
 * The golden prompt/eval registry for the deterministic AI provider (P7). Each row
 * is an input + the invariant the eval asserts. This is the offline eval set the
 * atlas requires; it also pins the abstention / Scenario-7 behaviour.
 */
export interface AiGoldenCase {
  name: string;
  jobType: AiJobType;
  text: string;
  expect: {
    artifactType: string;
    claimTypes: string[];
    abstained: boolean;
    /** For EXTRACT event cases: the certainty must never exceed DISCUSSION (Scenario 7). */
    maxCertainty?: string;
  };
}

export const AI_GOLDEN: AiGoldenCase[] = [
  {
    name: 'classify after-hours party',
    jobType: 'CLASSIFY',
    text: 'There is a party at 9 PM tonight!',
    expect: { artifactType: 'CLASSIFICATION', claimTypes: ['MODERATION_FLAG'], abstained: false },
  },
  {
    name: 'classify safe message',
    jobType: 'CLASSIFY',
    text: 'Community cleanup on Saturday morning.',
    expect: { artifactType: 'CLASSIFICATION', claimTypes: [], abstained: false },
  },
  {
    name: 'summarize',
    jobType: 'SUMMARIZE',
    text: 'The committee met today. We discussed the budget. Next steps to follow.',
    expect: { artifactType: 'SUMMARY', claimTypes: [], abstained: false },
  },
  {
    name: 'extract candidate event stays DISCUSSION',
    jobType: 'EXTRACT',
    text: 'Maybe we do a party at 9 PM?',
    expect: { artifactType: 'EXTRACTION', claimTypes: ['EVENT'], abstained: false, maxCertainty: 'DISCUSSION' },
  },
  {
    name: 'extract abstains when no claim',
    jobType: 'EXTRACT',
    text: 'Thanks everyone, appreciate it.',
    expect: { artifactType: 'EXTRACTION', claimTypes: [], abstained: true },
  },
];
