generate-brain-health-instruction.ts
9 lines · scripts/resolvers/preamble/generate-brain-health-instruction.ts at 3f79d81
1import type { TemplateContext } from '../types';
3export function generateBrainHealthInstruction(ctx: TemplateContext): string {
4 if (ctx.host !== 'gbrain' && ctx.host !== 'hermes') return '';
5 return `If \`BRAIN_HEALTH\` is shown and the score is below 50, tell the user which checks
6failed (shown in the output) and suggest: "Run \\\`gbrain doctor\\\` for full diagnostics."
7If the output is not valid JSON or health_score is missing, treat GBrain as unavailable
8and proceed without brain features this session.`;
9}