Recon (8 clusters) -> ideation (48->14->7, all verified) -> plans, cold-read verified by 8 fresh-context reviewers, 33 plan defects fixed pre-execution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
143 lines
11 KiB
XML
143 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<mxfile host="drawio" version="26.0.0">
|
|
<diagram name="Current architecture">
|
|
<mxGraphModel dx="1420" dy="900" grid="1" gridSize="10" page="1" pageWidth="1460" pageHeight="920">
|
|
<root>
|
|
<mxCell id="0" />
|
|
<mxCell id="1" parent="0" />
|
|
|
|
<mxCell id="title" value="Momentum — current production architecture (TrueNAS compose, 2026-07 @ d54a2a9)" style="text;html=1;fontSize=18;fontStyle=1;align=left;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="0" width="900" height="30" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="browser" value="Operator browser" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="60" width="180" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="telegram" value="Telegram" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
|
|
<mxGeometry x="300" y="60" width="160" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="feeds" value="Data feeds
Alpaca news · RSS · FMP float · SEC EDGAR" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
|
|
<mxGeometry x="700" y="60" width="240" height="60" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="alpaca" value="Alpaca Paper API
orders · account · SIP bars/quotes" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
|
|
<mxGeometry x="1040" y="60" width="240" height="60" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="compose" value="TrueNAS SCALE — Docker Compose stack (image: fez5587/momentum-app)" style="swimlane;startSize=30;html=1;fillColor=none;strokeColor=#666666;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="40" y="180" width="1340" height="580" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="dashboard" value="Dashboard :8765
static JS + SSE
(read-only projections)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="compose">
|
|
<mxGeometry x="30" y="60" width="210" height="80" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="admin" value="Admin :8767
config overrides · profiles
service control" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="compose">
|
|
<mxGeometry x="30" y="170" width="210" height="80" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="qabot" value="Telegram qabot
status Q&A (read-only)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="compose">
|
|
<mxGeometry x="30" y="280" width="210" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="pg" value="PostgreSQL 18
events (append-only)
minute_bars (~19M) · research tables" style="shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;boundedLbl=1;" vertex="1" parent="compose">
|
|
<mxGeometry x="480" y="160" width="240" height="130" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="nightly" value="Nightly scheduler
premarket_eval 20:00 ET
retention · shadow tracks · caches" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="compose">
|
|
<mxGeometry x="480" y="380" width="240" height="80" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="loop" value="Trading loop — run_live_paper.py" style="swimlane;startSize=30;html=1;fillColor=#f8f8f8;strokeColor=#6c8ebf;fontStyle=1;" vertex="1" parent="compose">
|
|
<mxGeometry x="810" y="50" width="490" height="350" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="schedthread" value="Scheduler thread
discover · ingest · watch · arm · guard" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="loop">
|
|
<mxGeometry x="20" y="40" width="210" height="70" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="trigthread" value="Trigger thread (4s)
live cross → submit_breakout_now" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="loop">
|
|
<mxGeometry x="260" y="40" width="210" height="70" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="exitmgr" value="LiveExitManager (12s)
BE ratchet · trail · EOD flatten" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="loop">
|
|
<mxGeometry x="20" y="140" width="210" height="70" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="execsvc" value="TradingExecutionService
gates · sizing · bracket orders" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="loop">
|
|
<mxGeometry x="260" y="140" width="210" height="70" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="syncsvc" value="AlpacaPaperSync (60s)
account · positions · orders · journal" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="loop">
|
|
<mxGeometry x="140" y="250" width="210" height="70" as="geometry" />
|
|
</mxCell>
|
|
|
|
<mxCell id="e1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="browser" target="dashboard">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.1;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="browser" target="admin">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="50" y="390" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="telegram" target="qabot">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="380" y="500" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e4" value="projections (read)" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="1" source="dashboard" target="pg">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e5" value="reads" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="qabot" target="pg">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e6" value="events · bars" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="loop" target="pg">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e7" value="writes · purges" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="nightly" target="pg">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e8" value="REST: bars · quotes · orders · fills" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="alpaca" target="loop">
|
|
<mxGeometry relative="1" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="e9" value="ingest" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.1;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="feeds" target="loop">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<mxPoint as="offset" x="-10" y="0" />
|
|
</mxGeometry>
|
|
</mxCell>
|
|
<mxCell id="e10" value="overrides.env · restart (docker sock)" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;labelBackgroundColor=#ffffff;fontSize=11;exitX=1;exitY=0.9;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="admin" target="loop">
|
|
<mxGeometry relative="1" as="geometry">
|
|
<Array as="points">
|
|
<mxPoint x="460" y="690" />
|
|
<mxPoint x="1100" y="690" />
|
|
</Array>
|
|
</mxGeometry>
|
|
</mxCell>
|
|
|
|
<mxCell id="legend" value="Legend" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#666666;verticalAlign=top;fontStyle=1;" vertex="1" parent="1">
|
|
<mxGeometry x="60" y="790" width="200" height="120" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg1" value="" style="rounded=0;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="legend">
|
|
<mxGeometry x="10" y="26" width="30" height="14" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg1t" value="Service / thread" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;" vertex="1" parent="legend">
|
|
<mxGeometry x="50" y="24" width="140" height="18" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg2" value="" style="rounded=0;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="legend">
|
|
<mxGeometry x="10" y="48" width="30" height="14" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg2t" value="Datastore" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;" vertex="1" parent="legend">
|
|
<mxGeometry x="50" y="46" width="140" height="18" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg3" value="" style="rounded=0;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="legend">
|
|
<mxGeometry x="10" y="70" width="30" height="14" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg3t" value="Scheduled job" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;" vertex="1" parent="legend">
|
|
<mxGeometry x="50" y="68" width="140" height="18" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg4" value="" style="rounded=0;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="legend">
|
|
<mxGeometry x="10" y="92" width="30" height="14" as="geometry" />
|
|
</mxCell>
|
|
<mxCell id="leg4t" value="Broker API (money path)" style="text;html=1;align=left;verticalAlign=middle;fontSize=11;" vertex="1" parent="legend">
|
|
<mxGeometry x="50" y="90" width="140" height="18" as="geometry" />
|
|
</mxCell>
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|