[
  {
    "name": "stale_leads",
    "kind": "delete",
    "table": "helpwin_leads",
    "age_days": 90,
    "description": "Stale leads with no conversion in 90 days"
  },
  {
    "name": "abandoned_submissions",
    "kind": "delete",
    "table": "helpwin_submissions",
    "age_days": 30,
    "description": "Abandoned submissions (no conversion in 30 days)"
  },
  {
    "name": "old_webhook_events",
    "kind": "delete",
    "table": "helpwin_webhook_events",
    "age_days": 90,
    "description": "Webhook idempotency log — 90-day window"
  },
  {
    "name": "old_dead_letters",
    "kind": "delete",
    "table": "helpwin_dead_letters",
    "age_days": 365,
    "description": "Dead-letter queue entries beyond 365 days"
  },
  {
    "name": "old_sms_log",
    "kind": "delete",
    "table": "helpwin_sms_log",
    "age_days": 365,
    "description": "SMS send log beyond 365 days (opt-outs preserved indefinitely)"
  },
  {
    "name": "old_admin_audit",
    "kind": "delete",
    "table": "helpwin_admin_audit",
    "age_days": 730,
    "description": "Admin audit log beyond 730 days"
  },
  {
    "name": "stale_preview_sites",
    "kind": "delete",
    "table": "helpwin_preview_sites",
    "age_days": 60,
    "description": "Draft preview sites untouched for 60 days"
  },
  {
    "name": "old_system_health",
    "kind": "delete",
    "table": "helpwin_system_health",
    "age_days": 90,
    "description": "System health snapshots beyond 90 days"
  },
  {
    "name": "truncate_sms_bodies",
    "kind": "rpc",
    "table": "helpwin_sms_log",
    "age_days": 90,
    "description": "Truncate SMS bodies to type+length after 90-day dispute window (TCPA metadata preserved)"
  },
  {
    "name": "truncate_communications_bodies",
    "kind": "rpc",
    "table": "helpwin_communications",
    "age_days": 90,
    "description": "Truncate communication bodies to channel+direction+length after 90 days"
  },
  {
    "name": "depersonalize_completed_bookings",
    "kind": "rpc",
    "table": "helpwin_bookings",
    "age_days": 90,
    "description": "Strip customer PII from bookings 90 days post-completion; rollup counters incremented before strip"
  },
  {
    "name": "depersonalize_inactive_customers",
    "kind": "rpc",
    "table": "helpwin_customers",
    "age_years": 3,
    "description": "Strip customer-master PII after 3 years of inactivity; aggregate counts preserved in rollup"
  },
  {
    "name": "archive_to_aggregates",
    "kind": "rpc",
    "table": "helpwin_bookings,helpwin_customers,helpwin_communications",
    "age_years": 5,
    "description": "Hard-delete depersonalized rows beyond 5 years; aggregate-only state"
  }
]