Fuente en inglés — traducción pendiente — inglés

Data Flow — from tick to decision

This is the canonical path (from agents/skill.md §4). Every arrow is a

contract boundary.

TickData (MT5 / paper / gateway)
  → ScalpFeatureEngine.to_tensor_input()
      50D base (scalp_v1 · FEATURE_NAMES · [-3,+3] · finite)
  → assemble_70d / build_70d_vector()
      70D canonical: Base 0..49 | News 10D 50..59 | Liquidity 10D 60..69
  → InferenceContractValidator
      scaler dim == feature dim · schema hash · finite · bounds
  → ScalpNet → 4 logits (NO_TRADE / BUY / SELL / WAIT) → confidence gate 0.35
  → regime_classifier (Regime Guardian)
  → signals/policy + rule_matrix (~30 rules, TTL 5s cache)
  → RiskEngine.calculate_dynamic_volume() + evaluate_proposal()
      free-margin 20% clamp · tier caps · HARD_MAX_LOTS
  → OrderManager (60-scenario router · 11 position states ·
      MAX_TOTAL_EXPOSURE=1 · 30s re-quote lock · 1.0×ATR drift)
  → broker (IMT5Port adapter: Win32 IPC / ZMQ / paper)
  → accounting (TradeOutcome / ACCOUNT_SNAPSHOT) → AuditRepository (queued, WAL)
  → web SSE/WebSocket + Telegram (read-only) + experience/research/shadow

Contract boundaries in the flow

BoundaryEnforced byFailure mode
feature dim / orderingschema registry + schema_contract hashloud rejection (FEATURE_CONTRACT_MISMATCH), never silent padding
scaler ↔ featuresInferenceContractValidatorSCALER_MISMATCH blocks inference
confidence semanticspolicy gate measures trained-class directional share (CHG-0042)miscalibrated confidence cannot masquerade as direction
sizing limitsRiskEngine + OrderManager clampsorder refused
order authorityports/adapters isolation + INV-002research/learning components physically cannot place orders
persistenceAuditRepository background writerhot path never blocks (INV-001)

Hot-path discipline (INV-001)

The tick pipeline performs zero synchronous I/O: no DB queries, no

training, no network on the tick path. Bar aggregation and broker snapshots

are cached off-path; news context is cache-only.

Assembly rules for the 70D block

Missing sub-blocks require explicit neutral vectors (FEATURE_DISABLED) —

silent fabrication is forbidden; unavailable features block

(FEATURE_UNAVAILABLE). Reordering features changes the schema hash, which

invalidates models — by design.