← All posts

· T Today / invest-t-advisor

Rules First, AI Second: T Today’s Two-Layer Decision Engine

The product shape

T Today (t.xingai.app) answers a narrow question:

Given my screenshot and our defensive 做T rules, what should I watch today — and what does the paper lab say I must fix first?

That’s a decision system, not a chatbot. Invest AI’s flagship answers macro and signal questions on a worker-owned cache. T Today owns overnight base + intraday T structure in its own repo — same UX discipline, different domain.

Two layers

LayerCodeJob
Rulessrc/lib/risk-control/*Deterministic: base ≤200 sh/symbol, cash ≥60%, T stop −1.5%, flatten orders, traffic lights
AIadvisory-llm.tsVision + bilingual JSON: holdings extract, tDecision zones, narrative
Mergerisk-decision-engine/*prioritizedActions: rule rows first, then AI

Rules win on hard constraints. The model can suggest T entries and copy — it cannot mark overnight structure “ok” when rules say otherwise.

Screenshot path matters

On image upload we do not inject stale demo portfolio into the vision prompt. The screenshot is source of truth. After extract, we sync holdings and re-merge the decision so rule lights match the new positions.

That’s the difference between a demo and something you might actually trust for paper practice.

What we don’t do

  • Recompute rankings or macro state in the Next.js API (that’s Invest AI worker territory).
  • Send broker orders.
  • Cache-bust with a fake “refresh” that silently changes investment meaning on the client.

Related posts

ADR: 0004