Follow-up from #299 (agent-migration epic #152).
Context
After #145, prompts/quiz_context_update.txt is used only as the user message passed to quiz_context_agent (agents/quiz_context.py). That agent already owns the analyst persona in its system_prompt and enforces the output shape via a structured output_type=QuizContext.
The template still ends with its own instruction block:
Output ONLY valid JSON, no markdown, no backticks:
{
"weak_areas": [...],
...
}
Problem
That trailing schema block is now dead weight and a silent-drift risk: it duplicates the QuizContext model, but since output is driven by output_type, editing the template's schema has no effect on what the agent returns. A future dev editing the template to add/rename a field would see no behavior change and could be misled.
Not urgent
A live smoke test on the #299 branch confirmed the redundant instructions are currently harmless — Pydantic AI's structured output returns a clean, correctly-typed QuizContext (not raw JSON text). So this is cleanup/maintainability, not a bug.
Proposed fix
Trim quiz_context_update.txt down to just the data/context it provides (concept, student, previous notes, score, results) and delete the "Output ONLY valid JSON: {schema}" block, since the agent's system prompt + QuizContext now own the persona and shape. Re-run a quick live check after, since it's a prompt-content change.
Follow-up from #299 (agent-migration epic #152).
Context
After #145,
prompts/quiz_context_update.txtis used only as the user message passed toquiz_context_agent(agents/quiz_context.py). That agent already owns the analyst persona in itssystem_promptand enforces the output shape via a structuredoutput_type=QuizContext.The template still ends with its own instruction block:
Problem
That trailing schema block is now dead weight and a silent-drift risk: it duplicates the
QuizContextmodel, but since output is driven byoutput_type, editing the template's schema has no effect on what the agent returns. A future dev editing the template to add/rename a field would see no behavior change and could be misled.Not urgent
A live smoke test on the #299 branch confirmed the redundant instructions are currently harmless — Pydantic AI's structured output returns a clean, correctly-typed
QuizContext(not raw JSON text). So this is cleanup/maintainability, not a bug.Proposed fix
Trim
quiz_context_update.txtdown to just the data/context it provides (concept, student, previous notes, score, results) and delete the "Output ONLY valid JSON: {schema}" block, since the agent's system prompt +QuizContextnow own the persona and shape. Re-run a quick live check after, since it's a prompt-content change.