File size: 1,357 Bytes
391c43e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { TestAssertion } from '@/lib/testing/types';

/**
 * Interview template types. Completion of each item is verified by the harness
 * (the completion gate), reusing the benchmark TestAssertion machinery.
 */

export interface InterviewItem {
  /** Stable id, used in the agenda and for per-item completion feedback. */
  id: string;
  /** What to gather from the user (the agent's instruction for this item). */
  elicit: string;
  /** How the harness verifies the item is satisfied (file checks and/or judge). */
  completion: TestAssertion[];
  /** Required items gate completion; optional items are nice-to-have. Defaults to true. */
  required?: boolean;
}

/** An action offered to the user when an interview completes. */
export interface InterviewHandoff {
  label: string;
  prompt: string;
  mode: 'code' | 'chat';
}

export interface InterviewTemplate {
  id: string;
  title: string;
  description: string;
  items: InterviewItem[];
  /** The artifact(s) the interview produces, under /.interviews/. */
  artifacts: { path: string; description?: string }[];
  /** Optional action offered when the interview completes. */
  handoff?: InterviewHandoff;
  /** Custom-only metadata. Undefined on built-ins. */
  isBuiltIn?: boolean;
  createdAt?: Date;
  updatedAt?: Date;
  lastSyncedAt?: Date | null;
  serverUpdatedAt?: Date | null;
}