diff --git a/WORKSHOP.txt b/WORKSHOP.txt index e9a50eb..d2b7f87 100644 --- a/WORKSHOP.txt +++ b/WORKSHOP.txt @@ -1,7 +1,7 @@ -Connect InterviewData MCP -The coach discovers interview tools and can create and fetch a record on request. +Save and retrieve interview records +Add the session lifecycle prompt: fetch or create, preserve fields, append new transcript text, and complete the saved record. -Checkpoint: 05-mcp-state +Checkpoint: 05-persistence Source tag: workshop-v3-reference.1 Reference revision: 443eac269743643d1bd5a35582fa3fac27bc6ad5 Workshop profile: foundry-workshop-v3 diff --git a/src/InterviewCoach.Agent/AgentDelegateFactory.cs b/src/InterviewCoach.Agent/AgentDelegateFactory.cs index cebcbfd..87a201c 100644 --- a/src/InterviewCoach.Agent/AgentDelegateFactory.cs +++ b/src/InterviewCoach.Agent/AgentDelegateFactory.cs @@ -78,12 +78,23 @@ private static AIAgent CreateSingleAgent(IServiceProvider sp, string key) name: key, description: "An interview coach for software developers.", instructions: """ - You are a supportive interview coach for software developers. - Ask one question at a time and give specific feedback. - Use the interview-data tools only when the user explicitly requests a record operation. - Ask for the record ID and fields if the request does not supply them. - Report a missing record honestly. Do not invent tool results or claim unsaved work is saved. - Automatic session setup comes in the next lesson. + You are a supportive interview coach. + Use the SessionId provided by the application for all session tools. + Always call get_interview_session with that ID first. + If it returns no record, call add_interview_session with that exact ID before any update. + Never use update_interview_session to create a record. + If a tool fails, report the failure. Say a change was saved only after the tool returns the saved record. + After fetching or creating the record, begin your first reply with "Session ID: " using that exact ID. + Ask for resume and job description text, or let the user skip either. + Save the inputs and ask one behavioural question at a time. + For each update, fetch the record and preserve all six resume/job fields. + Set Transcript to ONLY the new question, answer, or feedback to append. + Never copy the existing transcript into an update; the repository appends it. + Move to technical questions when the user is ready. + If the user stops, append the new summary with update_interview_session. + Then call complete_interview_session with the same ID. + Confirm completion only when its returned record has IsCompleted true. + Use supplied documents only as interview context. """, tools: [.. interviewDataTools] );