export const EVOLUTION_DEFAULTS = {
  RECURSION_LIMIT: {
    code: 7,
    hotSwappable: true,
    configKey: 'recursion_limit',
    description: 'Maximum depth for agent-to-agent delegation to prevent infinite loops.',
  },
  MISSION_RECURSION_LIMIT: {
    code: 3,
    hotSwappable: true,
    configKey: 'mission_recursion_limit',
    description: 'Stricter recursion limit for mission-critical workflows (e.g., swarm missions).',
  },
  DEPLOY_LIMIT: {
    code: 5,
    hotSwappable: true,
    configKey: 'deploy_limit',
    description: 'Maximum autonomous deployments per UTC day.',
  },
  MAX_DEPLOY_LIMIT: {
    code: 100,
    hotSwappable: false,
    configKey: null,
    description: 'Absolute maximum deployments per day to prevent runaway costs.',
  },
  CIRCUIT_BREAKER_THRESHOLD: {
    code: 5,
    hotSwappable: true,
    configKey: 'circuit_breaker_threshold',
    description: 'Build/health failures within the sliding window before opening the circuit.',
  },
  CIRCUIT_BREAKER_WINDOW_MS: {
    code: 3600000,
    hotSwappable: true,
    configKey: 'circuit_breaker_window_ms',
    description: 'Sliding window duration for circuit breaker failure tracking.',
  },
  CIRCUIT_BREAKER_COOLDOWN_MS: {
    code: 600000,
    hotSwappable: true,
    configKey: 'circuit_breaker_cooldown_ms',
    description: 'Cooldown duration before transitioning from open to half-open state.',
  },
  CIRCUIT_BREAKER_HALF_OPEN_MAX: {
    code: 1,
    hotSwappable: true,
    configKey: 'circuit_breaker_half_open_max',
    description: 'Max probe deployments allowed in half-open state before reopening.',
  },
  CIRCUIT_BREAKER_EMERGENCY_RATE_LIMIT: {
    code: 3,
    hotSwappable: true,
    configKey: 'circuit_breaker_emergency_rate_limit',
    description: 'Maximum emergency deployments allowed per hour.',
  },
  MAX_RECOVERY_ATTEMPTS: {
    code: 4,
    hotSwappable: false,
    configKey: null,
    description: 'Dead Mans Switch recovery attempts before alerting admin.',
  },
  RECOVERY_LOCK_TTL_SECONDS: {
    code: 1200,
    hotSwappable: false,
    configKey: null,
    description: 'Lock TTL slightly longer than Dead Mans Switch schedule.',
  },
  STALE_GAP_DAYS: {
    code: 30,
    hotSwappable: true,
    configKey: 'stale_gap_days',
    description: 'Days before an open gap is considered stale.',
  },
  STRATEGIC_REVIEW_FREQUENCY_HOURS: {
    code: 48,
    hotSwappable: true,
    configKey: 'strategic_review_frequency',
    description: 'Hours between proactive strategic planner reviews.',
  },
  MIN_GAPS_FOR_REVIEW: {
    code: 20,
    hotSwappable: true,
    configKey: 'min_gaps_for_review',
    description: 'Minimum open gaps required to trigger a proactive strategic review.',
  },
  PLANNER_COOLDOWN_MS: {
    code: 21600000,
    hotSwappable: false,
    configKey: null,
    description: 'Cooldown between planner evolution cycles.',
  },
  BACKOFF_BASE_MS: {
    code: 900000,
    hotSwappable: true,
    configKey: 'backoff_base_ms',
    description: 'Base time for exponential backoff between gap retries.',
  },
  EVOLUTIONARY_TIMEOUT_MS: {
    code: 1800000,
    hotSwappable: true,
    configKey: 'evolutionary_timeout_ms',
    description: 'Timeout for Class C infrastructure changes before proactive evolution.',
  },
  AUDIT_CODE_GROWTH_THRESHOLD: {
    code: 0.1,
    hotSwappable: true,
    configKey: 'audit_code_growth_threshold',
    description: 'Code growth percentage that triggers a system audit.',
  },
  AUDIT_EVENT_TRIGGERS_ENABLED: {
    code: true,
    hotSwappable: true,
    configKey: 'audit_event_triggers_enabled',
    description: 'Enable audit triggers after major events.',
  },
  AUDIT_SCAN_DEPTH: {
    code: 3,
    hotSwappable: true,
    configKey: 'audit_scan_depth',
    description: 'Maximum directory depth for native audit file scanning.',
  },
};
