{
  "module": "SIGNAL_LAYER",
  "version": "1.0",
  "description": "The Soul of Calculatiks – Binary signal + execution choice: Manual (EOA) or Delegated (Smart Account).",
  "mantra": "GREEN = life. RED = wait. Your agent watches. You decide. The chain enforces.",
  "signal_aggregation": {
    "green": "At least one strategy sees the spread",
    "red": "The market sleeps – every second burns and builds",
    "priority": ["SPREAD_V1", "TRADING_V1", "HOLDING_V1"]
  },
  "execution_choice": {
    "mode_manual": {
      "name": "MANUAL",
      "description": "User signs each transaction with their EOA wallet",
      "wallet_type": "EOA (MetaMask, Rabby, WalletConnect)",
      "requires_smart_account": false,
      "user_confirmation": true,
      "auto_execute": false,
      "flow": ["Detect green", "Prepare tx", "Display proposal", "User signs with EOA", "Tx sent"]
    },
    "mode_delegated": {
      "name": "DELEGATED",
      "description": "Agent signs UserOperations with session key, validated by Smart Account",
      "wallet_type": "Smart Account (ERC-4337)",
      "requires_smart_account": true,
      "requires_delegation_layer": true,
      "user_confirmation": false,
      "auto_execute": true,
      "flow": ["Detect green", "Check on-chain permissions", "Agent signs UserOp with session key", "Smart Account validates", "Tx executed on-chain", "Notify user"],
      "without_smart_account": "DELEGATED mode is DISABLED. Only MANUAL mode available."
    },
    "switch": "Instant switch at any time"
  },
  "delegation_requirement": {
    "description": "Delegated mode requires explicit non-custodial mechanics",
    "mechanisms": ["ERC-4337", "ERC-7715", "ERC-7579"],
    "reference": "delegation_layer.json",
    "if_not_available": "DELEGATED mode is unavailable. Only MANUAL mode works."
  },
  "emergency_stop": {
    "triggers": [
      "negative_profit_on_3_consecutive_trades",
      "extreme_volatility",
      "daily_limit_reached",
      "session_expired",
      "user_revoked_on_chain",
      "smart_account_paused"
    ]
  },
  "wallet": {
    "mode_manual": "EOA – user's private key signs directly",
    "mode_delegated": "Smart Account – session key signs UserOperations",
    "private_key": "never stored – your capital remains yours"
  },
  "alerts": {
    "on_green_signal": true,
    "on_delegated_trade": true,
    "channels": ["console", "webhook", "telegram"]
  },
  "note": "Manual or Delegated: you choose. At any time. The agent adapts. The chain enforces. The spread will never be lost again."
}