# Runtime Architecture — Phase 1 Closed

Stand: 2026-06-29

## Production Posture

```text
mode=paper_only
live_order_allowed=false
mainnet_signed_action=false
Tiny/Normal Live: not approved
```

## Target Architecture

```text
HyperLiquid read-only data
  ├─ allMids / candles / l2Book / metaAndAssetCtxs
  │
  ▼
Market Snapshot Layer
  ├─ market_snapshot.v1
  ├─ price / ohlcv / trend / momentum / volatility
  ├─ liquidity / derivatives / fundamentals / sentiment
  └─ regime / risk / confluence
  │
  ▼
Confluence Score Engine v1
  ├─ trend_score
  ├─ momentum_score
  ├─ volatility_score
  ├─ liquidity_score
  ├─ derivatives_score
  ├─ sentiment_score
  ├─ portfolio_score
  ├─ risk_score
  └─ final_trade_score
  │
  ▼
v76 strict Paper Runtime
  ├─ anti-chase / retest gate
  ├─ confluence paper-only gate
  └─ real paper lifecycle
       ├─ entry fill simulation
       ├─ stop-loss / take-profit / trailing / time exit
       ├─ fees / slippage / funding
       └─ MFE / MAE / true lifecycle PnL
  │
  ▼
Reports / Promotion Gates / Watchdogs
  ├─ daily HyperLiquid report
  ├─ lifecycle scorecard
  ├─ anti-chase impact
  ├─ market confluence report
  └─ promotion remains paper_only until explicit approval
```

## Optional Inputs

```text
TradingView Webhook        -> paper_signal only
TradingView Community Ideas -> research_only
Copy/Vault Research         -> future shadow/research only
```

None of these optional inputs may execute live orders.

## Legacy Boundary

`AutoTrader.py` and old monolithic direct-order paths are legacy references only.

Rules:

```text
Do not use as live core.
Do not start without CTB_ALLOW_LEGACY_AUTOTRADER=true.
Do not use for autonomous trading.
Use src/tools/v76_paper_runtime.py and src/tools/v76_paper_supervisor.py.
```

## Hard Safety Invariants

```text
No order without exchange-level stop.
No order on reconcile uncertainty.
No order during API degraded state.
No martingale.
No averaging down.
No risk increase without explicit user approval.
Daily/weekly loss gates are hard gates.
Max open positions are hard gates.
Secrets must never be logged or committed.
```

## Phase 1 Closure Criteria

Closed in this repo state:

```text
README exists and documents modes/commands/live invariants.
Runtime runbook exists and documents active processes/Cron jobs/manual checks.
Architecture document exists and defines src/ target architecture.
Legacy AutoTrader guard exists and was verified.
Git branch is synchronized after implementation commits.
Live flags remain disabled.
```
