Inspiration
As an active trader, I wanted a tool that could identify the first controllable mistake in a trading day instead of simply telling me whether the day was profitable or unprofitable.
Traders often know they had a bad day, but not the first controllable discipline break that caused it. Trader Discipline Coach converts a single trading day into traceable evidence and one enforceable rule for the next session.
What it does
The application analyzes all symbols traded during one day and:
- detects the first supported discipline break
- calculates estimated avoidable damage
- produces a rule-compliant replay
- assigns stable Evidence IDs to every verified fact
- generates an evidence-bound diagnosis, tomorrow's rule, and action checklist
- remains fully usable without an API key through a deterministic fallback
The judge-safe demo contains three fully synthetic scenarios and never connects to a brokerage account or accesses private trading records.
Before Build Week
Before Build Week, Trader Analysis already provided the underlying trading journal experience, including daily records, trade logs, summaries, charts, and the established interface style.
It did not include the Trader Discipline Coach, deterministic discipline analysis, stable Evidence IDs, rule-compliant replay, validated AI explanations, synthetic judge scenarios, or the judge-safe fallback flow.
Built During Build Week
During Build Week, we built:
- the complete Trader Discipline Coach experience
- three anonymous synthetic sample scenarios
- deterministic evidence analysis as the authoritative layer
- stable and reproducible Evidence IDs
- first-break detection and avoidable-damage replay
- a server-side GPT-5.6 Structured Outputs endpoint
- validation that rejects unknown or unsupported Evidence ID citations
- a deterministic fallback when no OpenAI API key is available
- Demo mode and Journal mode entry points
- focused automated tests and isolated runtime defaults
- judge-ready documentation, sample data, and startup instructions
How we built it
The domain layer analyzes normalized trades for a selected day. It produces verified evidence first; the language model is never allowed to invent the underlying facts.
The optional GPT-5.6 layer receives only the evidence contract and must return a structured diagnosis, rule, and checklist. Every citation is checked against the supplied Evidence IDs. Invalid model output is rejected and replaced by the deterministic fallback.
The project is isolated from the original private application. It uses separate runtime defaults and synthetic data, and the evaluation path requires no IBKR connection, private credentials, or real trading records.
How Codex and GPT-5.6 were used
Codex helped design the evidence contract, implement the deterministic analysis, build the backend endpoint and interface, create tests, diagnose UI issues, and verify the complete Build Week extension.
GPT-5.6 serves as an optional server-side explanation layer through Structured Outputs. It can explain verified evidence, but it cannot modify deterministic conclusions or cite evidence that was not supplied.
Challenges
The main challenge was balancing useful AI coaching with trust and reproducibility. We addressed this by separating calculation from explanation: deterministic code owns the facts, while GPT-5.6 is constrained to evidence-bound communication.
A second challenge was ensuring judges would never be blocked by missing credentials. The complete experience therefore works without an API key.
Accomplishments
- Evidence-backed coaching instead of unconstrained advice
- Stable, verifiable Evidence IDs
- Rejection of unsupported model citations
- A complete no-key fallback experience
- Multi-symbol, single-day analysis
- Synthetic, privacy-safe judging flow
- 119 passing automated tests and a successful production frontend build
What we learned
AI coaching becomes more trustworthy when the model is responsible for explanation rather than fact creation. Stable evidence references make every recommendation inspectable and testable.
What's next
Future versions could add longitudinal pattern detection across multiple sessions, configurable coaching policies, and richer comparisons between planned and actual execution while preserving the same evidence-first architecture.
Built With
- api
- codex
- fastapi
- gpt-5.6
- openai
- outputs
- pydantic
- python
- react
- sqlite
- structured
- typescript
- vite
Log in or sign up for Devpost to join the conversation.