Reproduces the legacy circlehealthai-webaudit-chart edge function's
prompt + response contract verbatim (compliance-auditor system prompt,
pass | fail | needs_review status), instead of v2's tool-using
AgentQuestionRunner agent prompt. Used only for session-note-triggered
validations (selected via runnerVariant: 'session-note-v1').
Deliberate deviations from v1 mechanics (the reviewer's concern was the
PROMPT, not the retrieval mechanism):
The whole cleaned session note is injected directly as the context
(this.sessionNoteContext); v1 embedded it and did a 3-chunk
similaritySearch. Direct injection feeds the full note and is strictly
better.
No transformQuestion / expandQuestionWithLLM — v1 ran the raw
question.
The shared createChartReviewChatModel is reused (gpt-4.1 / temp 0.1;
settings-driven maxTokens, defaulting ≥ v1's hard-coded 1000).
v1's reason: string[] is folded into the persisted answer; v1's
question_ui is dropped; v1's fallback-status second LLM call is
replaced by a schema-required status that defaults to needs_review.
V1-faithful session-note validation runner.
Reproduces the legacy
circlehealthai-webaudit-chartedge function's prompt + response contract verbatim (compliance-auditor system prompt,pass | fail | needs_reviewstatus), instead of v2's tool-usingAgentQuestionRunneragent prompt. Used only for session-note-triggered validations (selected viarunnerVariant: 'session-note-v1').Deliberate deviations from v1 mechanics (the reviewer's concern was the PROMPT, not the retrieval mechanism):
this.sessionNoteContext); v1 embedded it and did a 3-chunk similaritySearch. Direct injection feeds the full note and is strictly better.transformQuestion/expandQuestionWithLLM— v1 ran the raw question.createChartReviewChatModelis reused (gpt-4.1 / temp 0.1; settings-drivenmaxTokens, defaulting ≥ v1's hard-coded 1000).reason: string[]is folded into the persistedanswer; v1'squestion_uiis dropped; v1's fallback-status second LLM call is replaced by a schema-required status that defaults toneeds_review.