Request composition
Direct-provider and local CLI chat share the semantic health-tool instructions inshared/chat-tool-instructions.ts and the current catalog in shared/agent-tool-contract.ts. The direct loop and local adapter add their transport envelopes around the same enabled context and review boundary. Personal gateways receive baseline context without the local tool credential. Instructions do not replace runtime permissions. See Health chat tools and the routing boundary.
The system instruction for a normal chat turn is assembled in this order:
[Response from {name}] before they are sent to the current personality.
Health-tool instruction layer
When Health updates through chat is enabled, interactive tool-capable routes appendCHAT_TOOL_INSTRUCTIONS and bounded review context. The shared instruction keeps ordinary education and hypothetical conversation tool-free unless saved data is needed, recognizes explicit new personal facts, and directs read-before-draft proposals rather than guessed writes.
It separates personal from family history, diagnosis from suspicion, a goal from a symptom, and a period observation from a prediction. Intake messages can prepare independent reviews for multiple destinations. It also states the native-only management boundary and forbids Markdown imitations of proposal cards. When disabled, the off instruction explains the setting without letting the model enable it. A bounded repair instruction handles unsupported claims of prepared cards; the runtime remains authoritative.
Maintain this as one shared instruction source rather than copying separate provider-specific health editors. See Health chat tools for execution and Apply validation.
chat.base
Current base system prompt
Current base system prompt
Review watchpoints
- Personality changes communication style, not evidence or safety standards.
- Keep clinical boundaries specific and proportionate rather than repeating blanket disclaimers.
- Distinguish laboratory/optimal comparisons from personal recorded-history baselines; familiar abnormal values are not healthy targets.
- Keep absolute immune-cell counts, percentages, denominators, and laboratory intervals distinct. LMR and MLR are not independent findings.
- Preserve time labels and uncertainty. Lifestyle associations and interpretive lenses must not turn into unsupported causal or diagnostic claims.
- Missing context is not a reason to invent data or impose a full onboarding checklist.
chat.context
- Web and private-mode hints
- Personality
- Multi-persona attribution
Exactly one applicable hint is appended:
chat.continue and chat.discussion
These are automatic user-role messages, not system prompts.
Output-limit continuation
Output-limit continuation
Discussion round messages
Discussion round messages
Initial analyst:Later analyst or rebuttal:Newly joined personality:A user-entered steering message replaces the default round message when present.
chat.persona-generator
The user supplies only the requested person, character, archetype, or framework. The result is an editable draft and is not active until saved.
Current persona-generator system prompt
Current persona-generator system prompt
Review watchpoints
This prompt deliberately asks for controversial and anti-establishment positions and asks the draft not to include boilerplate safety language. That makes faithful attribution, hallucinated endorsement, stereotyping, impersonation, and attempted override of the base chat rules high-priority evaluation areas.chat.summary
Current consultation-summary system prompt
Current consultation-summary system prompt
lens.rewrite
Current Knowledge Base rewrite system prompt
Current Knowledge Base rewrite system prompt
chat.prefills
These are application-authored user messages, not system instructions. They are included because an explicit button can prepare or send them on the user’s behalf. A prefilled message is visible in the composer and can be changed before sending. An auto-sent shortcut sends its documented message immediately after the explicit click and is identified below.
Marker and correlation messages
Marker and correlation messages
Marker result:Correlation chart:
Genome and recommendation messages
Genome and recommendation messages
Genome finding:Recommendation detail:If the selected recommendation cannot be resolved:
Biology Scores messages
Biology Scores messages
Overview — sent after clicking the visible action:Coverage planner:
Supplement and diet messages
Supplement and diet messages
Mitochondrial evidence:Diet contaminants — sent after clicking the visible action:
Light Audit and EMF follow-up messages
Light Audit and EMF follow-up messages
Light Audit comparison:Discuss a generated EMF interpretation:
Empty-chat shortcut messages
Empty-chat shortcut messages
Depending on whether labs and profile cards exist, the visible buttons send one of these exact messages:
Focused verification
Relevant checks live in:tests/chat-runtime.test.tstests/test-audit.tstests/test-custom-personality.tstests/test-chat-actions.tstests/playwright/chat-discussion-browser-coverage.spec.ts