Produce a clean output/proposed-questionnaire.json or output/suggestions.json with stable linkIds, exact baseVersion, and the current typed proposal vocabulary. Use whenever you're about to suggest a structural change to the form.
Write product-facing replies and organize run outputs in the canonical Formtastic artifact layout. Always applies to every turn because reply.md is the visible chat response and all structured output depends on the run directory contract.
Create organized, copyright-safe research artifacts under output/research/. Always applies to evidence, guideline, citation, article, source-review, or literature turns.
Search Cochrane Reviews for systematic-review evidence and effect sizes. Use when the user wants the strongest evidence-base summary for a treatment, screening, or diagnostic question. Produces structured effect-size estimates with confidence intervals.
Find clinical practice guidelines from authoritative bodies (NICE, USPSTF, ACP, AHRQ, GIN). Use when the user asks "what does the guideline say" or wants to anchor a question or threshold to a recommended practice. Produces guideline-typed citations with the canonical URL of the recommendation.
Search PubMed via NCBI E-utilities to ground questionnaire items in primary literature. Use when the user asks for evidence, citations, or "what does the research say about X." Produces an organized research bundle with PubMed metadata, abstracts when available, and source-grounded notes.
Run schema + HL7 FHIR Validator + clinical-sanity validation on Questionnaire.json through Formtastic's host-managed validation endpoint. Use before publish, before a big propose-edit, or when the user asks "is this form valid?"
Rewrite summary.md so future turns don't need to re-read all of conversation.jsonl. Use periodically (every ~20 turns) or when the user explicitly asks "summarize what we've done so far."