How Claude actually talks to traders. 7 prompt templates — each with strict rules, variables from user memory, and output contracts. Drop-in ready. Versioned. Tested against regression sets before deploy.
Injected as the first system message on EVERY Claude call. Sets identity, voice, constraints. Non-negotiable rules.
User uploads chart screenshot. Claude Vision analyzes against the user's own criteria (not a "market call"). Returns grade, safe size, rule compatibility.
Rule engine fires deterministically. Claude adds the human context in 1-2 sentences. Uses the user's own memory to make it personal.
After market close, for each user, a worker pulls their session data and asks Claude to write a personalized retrospective. Stored in journal_entries. Exported to Remembra as long-term memory.
Weekly cron: pulls last 30 days of trades per user, asks Claude to identify statistically meaningful patterns. Findings go to Remembra as tagged memories usable by all other prompts.
User types natural language. Claude maps to one of 12 strategy templates + parameters. Safe: Claude doesn't generate code, only fills a schema.
Every prompt lives at packages/prompts/v<n>/<name>.md
Bumping version requires a PR with regression test proof. Old versions kept forever for audit.
Each prompt has __fixtures__/*.json with 10-20 sample inputs + expected output shape.
CI runs prompts against Claude on every PR · deploys blocked if any fixture fails shape validation.
Every production call logged (redacted): prompt version, tokens in/out, latency, schema validity.
Dashboard shows: failure rate, avg latency, cost/day. Alert if schema-invalid rate > 2%.
| Prompt | Model | Frequency | Cost/call |
|---|---|---|---|
| foundation | Appended to all | Every call | — |
| pretrade | Sonnet 4.6 (vision) | On user request | ~$0.015 |
| alertnarration | Haiku 4.5 | Per alert fire | ~$0.001 |
| journal | Sonnet 4.6 | Nightly per user | ~$0.03 |
| patterndetect | Sonnet 4.6 | Weekly per user | ~$0.05 |
| tiltdetect | Haiku 4.5 | Every 5 min while trading | ~$0.001 |
| backtestparse | Sonnet 4.6 | On backtest request | ~$0.005 |