Per-Trade Reflection
| Field | Value |
|---|---|
| Task ref | TM-44 |
| Code | packages/agents/src/trademate_agents/reflection |
| Trigger | Celery after confirmed position close |
| Model class | quick-think, with deterministic fallback |
| Prompt location | reflection/engine.py |
| Inputs | closed trade, signal context, execution data, realized P/L, SPY comparison |
| Outputs | strategy/regime/catalyst/outcome tags and short reflection |
| Storage | Journal/audit trade context and lifecycle reflection status |
| Budget | $0.03 per closed trade |
Trace Expectations
trademate.task_ref=TM-44- stages:
select_closed_trades,reflect_trade,write_journal - journal trade id and lifecycle event id when available