{
  "for_llm": "This page documents the Slack side of LeadLift OS: which channel each automation posts to and when. No Make scenario except Fidel's welcome (Make 'STEP 1B: Client Channel Created >> Fidel Welcome Message', 6582021). Channel ids live in the Modal secret leadlift-os-secrets under the SLACK_CHANNEL_* names in 'notifies'. change_policy: green = a column the app may write; amber = message wording, tags and timers set by Sheni with tests; red = channel settings, Slack credentials, stage names, default tag ids, the Slack interactivity URL.",
  "system": "LeadLift OS Walkthrough",
  "unit": {
    "index": 2,
    "of": 2,
    "node": "Slack channel system"
  },
  "platform": "code (Modal) + Slack app",
  "component": "LeadLift Slack channels",
  "code": {
    "repo": "https://github.com/Icarus-Growth/leadlift-os",
    "ref": "main (read at e0a8709 and a8c91d5, 12 Oct 2026)",
    "stage": null,
    "boxes": [],
    "files": [
      "os/api/editing.py (CHANNELS, messages_for_move, report_error)",
      "os/api/boards_notify.py (scripts, tasks, launches)",
      "os/api/footage.py (#new-creative)",
      "os/api/onboarding.py (#onboarding launch thread, STEPS)",
      "os/api/onboarding_legs.py (client channel, invites, bookmark, fidel_welcome_text)",
      "os/api/whop.py (#payments)",
      "os/api/calls.py (#call-transcripts)",
      "os/api/client_picker.py + POST /slack/interactions",
      "automations/jobs/board_digest.py",
      "shared/sentry.py",
      "deploy/app.py (footage_scan_schedule, board_digest)"
    ]
  },
  "trigger": {
    "type": "server events",
    "sources": [
      "Whop payment",
      "onboarding form",
      "database triggers on editing_pipeline, scripts, tasks, launches",
      "Raw Footage scan",
      "Fathom webhook",
      "Modal crons"
    ]
  },
  "reads": [
    {
      "table": "clients",
      "why": "slack_channel_id, ads_manager_url, client_reviews_edits"
    },
    {
      "table": "team",
      "why": "slack_user_id of Active members (tags, invites)"
    }
  ],
  "writes": [
    {
      "table": "clients",
      "why": "slack_channel_id and onboarding_thread_ts at onboarding"
    }
  ],
  "notifies": [
    {
      "slack": "#payments",
      "setting": "SLACK_CHANNEL_PAYMENTS",
      "when": "each successful Whop payment"
    },
    {
      "slack": "#onboarding",
      "setting": "SLACK_CHANNEL_ONBOARDING",
      "when": "launch message per new client; its thread = running tally of 17 steps"
    },
    {
      "slack": "#onboarding-forms",
      "setting": "SLACK_CHANNEL_FORMS (form worker: ONBOARDING_SLACK_CHANNEL)",
      "when": "each submitted form; client picker in thread"
    },
    {
      "slack": "client channel",
      "setting": "clients.slack_channel_id",
      "when": "Fidel's welcome (Make, as Fidel), Raw Footage bookmark, 30 Client Review link, 30 With Client script (main a8c91d5, 12 Oct)"
    },
    {
      "slack": "#call-transcripts",
      "setting": "SLACK_CHANNEL_CALLS",
      "when": "each Fathom call; summary in thread"
    },
    {
      "slack": "#new-creative",
      "setting": "SLACK_CHANNEL_NEW_CREATIVE",
      "when": "Raw Footage scan"
    },
    {
      "slack": "#editor-updates",
      "setting": "SLACK_CHANNEL_EDITOR_UPDATES",
      "when": "card -> 10 To Edit; hand-in refused"
    },
    {
      "slack": "#creative-review",
      "setting": "SLACK_CHANNEL_CREATIVE_REVIEW",
      "when": "card -> 20 Internal Review"
    },
    {
      "slack": "#amendments",
      "setting": "SLACK_CHANNEL_AMENDMENTS",
      "when": "card -> 19 Redo Requested / 29 Client Changes; script -> 29 Changes Requested"
    },
    {
      "slack": "#approved-creative",
      "setting": "SLACK_CHANNEL_APPROVED_CREATIVE",
      "when": "card -> 40 Ready To Launch; script -> 100 Approved"
    },
    {
      "slack": "#scripts-to-write",
      "setting": "SLACK_CHANNEL_SCRIPTS_TO_WRITE",
      "when": "new script at 0 To Write"
    },
    {
      "slack": "#script-review",
      "setting": "SLACK_CHANNEL_SCRIPT_REVIEW",
      "when": "script -> 20 Internal Review (tags Fidel)"
    },
    {
      "slack": "#creative-management",
      "setting": "SLACK_CHANNEL_CREATIVE_MANAGEMENT",
      "when": "board digest cron"
    },
    {
      "slack": "#new-tasks",
      "setting": "SLACK_CHANNEL_NEW_TASKS",
      "when": "new task"
    },
    {
      "slack": "#task-updates",
      "setting": "SLACK_CHANNEL_TASK_UPDATES",
      "when": "task -> 9 Blocked, 29 Amendments, 30 In Review, 100 Complete"
    },
    {
      "slack": "#campaign-launches",
      "setting": "SLACK_CHANNEL_CAMPAIGN_LAUNCHES",
      "when": "new launch; launch -> 40 Live"
    },
    {
      "slack": "#pipeline-errors",
      "setting": "SLACK_CHANNEL_PIPELINE_ERRORS",
      "when": "planned failures on editing and scripts; tags Fidel"
    },
    {
      "slack": "#sentry",
      "setting": "SLACK_CHANNEL_SENTRY",
      "when": "unplanned failures, 'needs a person' failures, 3 refusals in 24h, POST /ops/sentry from Make and the form; tags SENTRY_SLACK_ID (not set: @here)"
    }
  ],
  "schedules": [
    {
      "function": "footage_scan_schedule",
      "cron": "0 6,18 * * *",
      "timezone": "America/Chicago",
      "posts": "#new-creative"
    },
    {
      "function": "board_digest",
      "cron": "0 15 * * 0,1,3,5",
      "timezone": "America/Chicago",
      "posts": "#creative-management"
    }
  ],
  "edges": {
    "upstream": [
      {
        "node": "Operating system overview",
        "unit": 1,
        "via": "app card moves -> database triggers -> POST /editing/moved, POST /boards/moved"
      }
    ],
    "downstream": [],
    "other_systems": [
      {
        "system": "Onboarding",
        "href": "../onboarding/",
        "via": "Whop payment, onboarding legs, form"
      },
      {
        "system": "Editing Pipeline",
        "href": "../editing-pipeline/",
        "via": "footage scan, stage moves, client review page"
      }
    ]
  },
  "capabilities": [
    "Creates one private client channel per new client; invites every Active team member with a slack_user_id, the bot, Viktor and the onboarding alert person; Slack Connect invite to the client",
    "Bookmarks the Raw Footage folder; Fidel's welcome via Make",
    "Posts every board stage move in its channel with [LINK] to the OS record",
    "Board digest Mon/Wed/Fri/Sun 15:00 Central; footage scan 06:00 and 18:00 Central",
    "#sentry: one post per fault per hour, repeats counted on the post, fix steps in the thread, secrets cut from the text"
  ],
  "boundaries": [
    "Posts by channel id (rename-safe); an archived or deleted channel, or a channel without the bot, fails",
    "A failed post is not retried: scripts and editing go to #pipeline-errors, tasks, launches and the digest go to #sentry",
    "The 50 clients imported on 11 Oct have no slack_channel_id and the bot is not in their channels",
    "Messages match exact stage names"
  ],
  "change_policy": {
    "green": [
      "team.slack_user_id (Team page)",
      "clients.slack_channel_id, clients.client_reviews_edits, clients.ads_manager_url (client record)"
    ],
    "amber": [
      "message text and tags in os/api/editing.py and os/api/boards_notify.py (Sheni 10-11 Oct; tests tests/editing/test_moves.py, tests/boards/test_boards_notify.py, tests/test_notify_spacing.py)",
      "footage scan cron (10 Oct editing plan; deploy/app.py)",
      "board digest cron (tests/editing/test_board_digest.py)",
      "fidel_welcome_text (Sheni 10 Oct)"
    ],
    "red": [
      "SLACK_CHANNEL_* (17 settings, channel ids)",
      "SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET",
      "stage names in os/app/src/lib/ladders.ts",
      "VIKTOR_SLACK_ID, ONBOARDING_ALERT_SLACK_ID, ONBOARDING_SLACK_PEOPLE_SLACK_ID, SENTRY_SLACK_ID, CALLS_ALERT_SLACK_ID",
      "Slack app Interactivity Request URL -> POST /slack/interactions"
    ]
  },
  "known_issues": [
    "SENTRY_SLACK_ID not set: #sentry tags @here",
    "Sterlin has no slack_user_id: not tagged, not invited to new client channels",
    "Script, task and launch messages have not run on real work (as of 12 Oct)",
    "The 30 With Client script post merged to main at a8c91d5 on 12 Oct after e0a8709; deploy not verified from this page",
    "A renamed stage stops its message with no report",
    "The Fathom webhook was set by hand; nothing checks it"
  ],
  "recovery": {
    "git": "every change is a commit on main, merged through the gate",
    "rollback": "modal app rollback leadlift-os"
  }
}