Docs AI Coach

AI Coach

Morning brief, post-trade review, and how the heuristic fallback works.

AI Coach is the prose layer over your journal data. Morning brief, post-trade review, weekly playbook audit (Elite). Everything has a deterministic heuristic fallback — if the LLM budget is gone or the API is down, you still get the analysis, just without the LLM polish.

Features

Morning brief

A short summary delivered at your chosen morning hour (ET): recent performance, notable setups, anything to watch for today (post-loss tilt, hit-rate dips on a specific setup). Heuristic generates the facts; the LLM rewrites them in coach voice.

Post-trade review

A per-trade verdict on the trade detail page: solid / shaky / plan-break, with a one-paragraph commentary on what worked or didn't. References your setup and the rules you flagged broken. Triage logic: trades that match a playbook setup and have |rMultiple| ≤ 2.5 and no rules broken get heuristic-only review (no LLM call, no cost). Everything else escalates.

Weekly playbook audit (Elite)

A weekly long-form review of your trading week — what worked, what didn't, where the playbook is leaking. Uses the deepest GPT-5 model. Heuristic version available on lower tiers.

How the fallback works

Every AI feature follows the same pattern: a pure-TypeScript fact extractor reads your data and returns structured JSON; a Mustache-style heuristic renderer turns those facts into prose; the LLM renderer takes the same facts plus a prompt and returns richer prose. The caller chooses based on tier, monthly budget, and API health.

If the LLM call fails (network, API outage, budget hit), the heuristic version renders instead. The journal is never blocked on third-party availability.

Cost tracking

Every LLM call is logged with input / output / cached token counts and computed cost. The monthly per-tier cap (visible only in admin views — user-facing copy says "low / higher / generous / unlimited") triggers fallback when crossed.

Elite users can supply their own OpenAI API key (BYO). The key is encrypted at rest and decrypted only at call time; usage doesn't count against the platform cap.