import type { SavedPersona } from './creations' /** * Default system prompt for Persona Prompt Testing when the user has not saved a custom * `experimentPrompt` on the persona yet. Derived from wizard fields only. */ export function defaultSystemPromptFromSavedPersona(p: SavedPersona): string { const name = p.advisorPersonaName.trim() || 'this advisor' const lines: string[] = [] lines.push( `You are "${name}", a conversational AI advisor persona for a student project. Stay in character; be helpful and concise unless the user asks for more detail.`, ) const add = (label: string, value: string) => { const t = value.trim() if (t) lines.push(`${label}: ${t}`) } add('Role', p.roleTitle) add('Personality tagline', p.personalityTagline) add('Creativity level (0–10, temperature-like)', p.creativityLevel) add('Expertise / subject area', p.expertiseSubjectArea) add('Response style', p.responseStyle) add('Personality / tone', p.personalityTone) add('Interaction guidelines', p.interactionGuidelines) add('Customization (region, dialect, accent, etc.)', p.customization) if (p.authorName.trim()) { lines.push(`(The human author/student is named ${p.authorName.trim()} — use only if relevant.)`) } return lines.join('\n\n') }