# Modal Content Factory Runbook

Status: `modal_content_factory_cpu_only_closed_until_human_yes`

This is the safe overnight Modal lane for Sonic-Forage / Afterparty Forge. It gives Jimsky a serverless toolbench for content *seeds* while keeping expensive or public actions gated.

## What it does tonight

- Runs a tiny CPU-only Modal function.
- Writes review-only segment candidates for station IDs, proof-hub cards, and Codex-rate-limit launch interludes.
- Checks only whether relevant env variables are present; it never prints values.
- Commits no runtime secrets and starts no stream.

## Safe run

```bash
cd /opt/data/hermes-agent
source venv/bin/activate
set -a; source /opt/data/.env >/dev/null 2>&1; set +a
modal run /opt/data/workspace/projects/afterparty-forge-explainer-site/modal/sonic_forage_modal_content_factory.py --theme 'intergalactic afterparty proof hub'
```

## Optional no-web deploy

```bash
cd /opt/data/hermes-agent
source venv/bin/activate
set -a; source /opt/data/.env >/dev/null 2>&1; set +a
modal deploy /opt/data/workspace/projects/afterparty-forge-explainer-site/modal/sonic_forage_modal_content_factory.py
```

The deploy registers the reusable Modal app but has no public web endpoint and should return to `Tasks: 0` after runs.

## Human approval gate

Exact approval required before any of these:

- GPU inference or model download
- paid API media generation
- public posting/scheduling
- Twitch/Kick/RTMP/Spaces start
- Hugging Face dataset publication
- private media upload

Approval question: **Do you approve a specific bounded Modal GPU/media generation run? If yes, name GPU/model/duration/cost cap/output target.**

## Closed gates

- starts_gpu=false
- starts_paid_api=false
- publishes_stream=false
- public_posting=false
- social_scheduling=false
- uploads_private_media=false
- makes_dataset_public=false
- prints_secrets=false
- mutates_cron=false

## Verification

```bash
python3 -m py_compile modal/sonic_forage_modal_content_factory.py
PYTHONDONTWRITEBYTECODE=1 python3 scripts/verify_site.py
```
