58 Podcast Production Engine
ASecurityTurn ONE completed podcast intake survey into ONE published podcast episode, end to end, autonomously, on the client's own box, with the client's own credentials, at a bounded cost, with independent quality control, full durability, and a client-facing dashboard. Fuses the fleet's render lane (Skill 57 podcast mode script writer plus Kie.ai cover, Skill 35 Fish render script plus Podbean playbook, Skill 30 Fish Audio reference) with the Skill 23 professional-podcast doctrine (director-of-podc...
- 3 stars
- 0 votes
- 0 copies
- 1 view
- Added November 14, 2026
Works with
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add trevorotts1/openclaw-onboarding --skill 58-podcast-production-engine --agent claude-codeAre you the author of 58 Podcast Production Engine?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/trevorotts1-58-podcast-production-engine)---
name: podcast-production-engine
description: Turn ONE completed podcast intake survey into ONE published podcast episode, end to end, autonomously, on the client's own box, with the client's own credentials, at a bounded cost, with independent quality control, full durability, and a client-facing dashboard. Fuses the fleet's render lane (Skill 57 podcast mode script writer plus Kie.ai cover, Skill 35 Fish render script plus Podbean playbook, Skill 30 Fish Audio reference) with the Skill 23 professional-podcast doctrine (director-of-podcast, podcast-host, audio-post-producer, qc-specialist-podcast, loudness mastering, quality gates). Runs the canonical 18-step pipeline across four output-type presets (Interview, Solo, Season-Strategy, Episode Asset Pack) and two production modes (Personal Podcast, Interview Style). Content work routes to Ollama Cloud Kimi 2.6 then GLM 5.2 then OpenRouter equivalents then Gemini 3.1 Flash Lite, NEVER an Anthropic model at runtime. The Convert and Flow data plane is Skill 44 caf plus Skill 29 REST only, never a Model Context Protocol tier inside the pipeline. Fish Audio synthesis uses model drama-3 via header with the client's own reference_id, never the free tier for client content. Two separate quality gates that are never conflated: the 8.5 ten-category build gate that decides whether work merges, and the 16 Tier-1 plus 10-dimension rubric plus 3-strike episode gate that decides whether an episode ships to a listener. Move in silence: the engine enrolls the workflow and STOPS, Convert and Flow owns every customer message. Zero em dashes, no triple backtick fences in any produced output.
version: 1.1.3
---
# Podcast Production Engine (Skill 58)
The canonical, per-client engine that turns one intake survey submission into one published
podcast episode, autonomously, on the client's own OpenClaw box, with the client's own
credentials, at a bounded cost, with independent quality control, durable state, and a
client-facing dashboard. This is the productionized, hardened FUSION of two mature fleet
lanes; it is INTEGRATION plus HARDENING of assets the fleet already owns, not a from-scratch
build, and reuse fidelity is a scored requirement of the build gate.
The fusion, stated once:
- The render lane knows how to WRITE and RENDER: Skill 57 podcast mode (script-writer prompt,
Kie.ai cover prompt, deterministic quality provers, golden fixture), Skill 35's production
Fish Audio render script, Skill 30's Fish Audio reference and voice standard operating
procedure.
- The doctrine lane knows how to RUN A PROFESSIONAL PODCAST OPERATION: Skill 23
role-library/podcast/ (director-of-podcast, podcast-host, audio-post-producer,
qc-specialist-podcast) and role-library/audio/ (podcast-editor, podcast-producer,
mastering), with loudness mastering at minus 14 to minus 16 LUFS integrated, four quality
gates, guest handling, distribution, and key performance indicators.
The engine binds the render lane to the doctrine lane through the four output-type presets in
Section 8 so one skill serves both a solo founder recording a weekly personal episode in a
cloned voice and an interview-style lead generation machine built on the SHUA principle (Seen,
Heard, Understood, Acknowledged).
## The silence doctrine and the responsibility boundary (binding)
Move in silence. These are non-negotiable and every code path in this skill honors them:
1. ZERO client-facing messages from the engine. The engine sends no SMS, no email, no chat,
no Telegram, nothing to the customer or the guest, ever. The engine enrolls the workflow
and STOPS at the boundary. Convert and Flow owns every customer message. A delivery report
goes to the OPERATOR channel only, never inside the script, never to the customer.
2. OPERATOR-VERBOSE, CLIENT-SILENT. Founder and operator surfaces are rich; customer-facing
surfaces are silent. Owner alerts are suppressed during maintenance. Never run
qc-completeness.sh standalone from this engine (it leaks a client Telegram alert).
3. NEVER print, echo, grep, or paste a secret value. Credentials are documented by label and
location only. A credential check reports SET or NOT SET plus a behavior probe, never the
value.
4. NEVER commingle clients. Only the named client's OWN accounts and keys are ever used. No
operator, shared, agency, or other-client credential ever substitutes for a client's own.
Per-client isolation is structural (physical box separation plus tenant check plus private
integration token fingerprint plus per-client secrets), not policed after the fact.
5. CONFIG WRITES RUN AS THE NODE USER, never root. A root-owned config file freezes the
gateway.
6. The client-facing product name is Convert and Flow. Never say GoHighLevel and never say GHL
on any client-visible surface. Internally, the data plane is still the same platform; the
NAME the client sees is Convert and Flow.
7. CANARY, THEN HOLD. The whole engine is proven on the operator box first. Fleet rollout is
HELD at repo-only until the operator gives the explicit OK. No client box is touched by the
build.
## Reuse before rebuild (what this engine binds to, never re-invents)
Reuse fidelity is scored by the build gate. Do not rebuild any of these; bind to them.
| Asset | What it gives this engine | Where it is used |
|---|---|---|
| Skill 57 podcast mode | Script-writer prompt scaffolding, Kie.ai cover prompt, deterministic prover style, golden-fixture pattern, graceful-skip and fail-closed-before-publish postures | Style-engine prompts, Step 10, quality provers, fixtures |
| Skill 35 render plus playbook section 15 | The production Fish render (retry loop plus ffprobe verify), the proven Podbean publish flow via the Convert and Flow content delivery network | Step 11 audio, Step 15 publish |
| Skill 30 Fish Audio reference | Request templates, emotion tag inventory, ffmpeg stitching guidance, the voice standard operating procedure | Steps 6, 11, and the tagging strategy |
| Skill 23 role-library podcast and audio | The professional production doctrine: LUFS targets, four quality gates, guest handling, distribution, key performance indicators, and the personas the engine binds to | Persona binding (Section 11), mastering, quality doctrine |
| Skill 44 caf plus Skill 29 REST | The entire Convert and Flow data plane (Tier 0 caf, Tier 3 REST); Skill 44 workflow discovery and enrollment | Steps 0, 14, 16, 17 |
| Skill 74 kie-live-adapter | The one KIE transport: `scripts/generate_cover.sh` submits, waits and downloads through its CLI and keeps only the cover policy (model, prompt, exit codes, finalize). Missing Skill 74 stops the step with exit 2; there is no second KIE client | Step 10 |
Boundaries with the sibling skills, so they never diverge: Skill 57 podcast mode remains the
SOCIAL PACKAGING lane; this engine is CANONICAL for full published episodes. Skill 35's
playbook is cross-linked as the productionized Podbean flow. Cross-references are added in both
directions so an edit to one never silently contradicts the other.
## Runtime model routing (never Anthropic at runtime)
This skill is authored offline by the build team. The SHIPPED skill routes ALL content work
through the client's own providers in this fixed cascade and never calls an Anthropic model,
provider, package, key, or host at runtime:
1. Ollama Cloud Kimi 2.6 (thinking high) first.
2. Ollama Cloud GLM 5.2 (thinking high) second.
3. OpenRouter equivalents in the same order.
4. Gemini 3.1 Flash Lite as the final fallback.
The judge tier for semantic quality checks (Gemini 3.1 Flash Lite or GLM 5.2) is DISTINCT from
the writer tier. The writer never grades its own work as the deciding vote. A merge-gate scan
(guard-no-anthropic-runtime) refuses any Anthropic reference in a shipped runtime file and
refuses deny-pattern substitutions at runtime; a prior fleet defect shipped Anthropic to 23 of
32 boxes and this guard exists to make that structurally impossible.
`model_router.py` is the deterministic EXECUTOR of that policy: the single call site every
runtime text turn flows through. It resolves the `content` or `qc_judge` tier from
config/models.json to the client's own priority-ordered provider chain, resolves each lane's
credential by ENV LABEL only (live process env first, reported SET or NOT SET, never a value),
advances the chain on retryable failures (insufficient_credits, auth, rate_limit, timeout,
refusal), meters every call through podcast-cost-ledger.py (a hard cost ceiling blocks the call
before it bills), and on chain exhaustion holds the job durably through credit_queue.py with
exactly ONE deduped founder alert through alert-dedup.py. It refuses at call time any resolved
model, provider, or family that matches the deny_patterns (claude, anthropic, us.anthropic,
opus, sonnet, haiku) or an Anthropic-family shape: a deny match is a HARD ERROR, never a silent
fallback. Every non-primary lane that serves a turn is recorded as a substitution (spooled for
the delivery report) so the model actually used is always named honestly.
model_router.py validate fail-closed check of config/models.json
model_router.py resolve <content|qc_judge> print a tier chain (SET/NOT SET only)
model_router.py deny-check <model-id> exit 2 if the id is denied
model_router.py route JSON {tier,messages,context} on stdin
model_router.py self-test offline routing/deny/exhaustion battery
## Data plane doctrine (Tier 0 caf plus Tier 3 REST only)
Sub-agents get NO Model Context Protocol injection. Therefore the two Model Context Protocol
tiers are structurally UNUSABLE inside this pipeline, because a sub-agent performing a media
upload or a field write-back would silently have no tools, and "silently no tools" is exactly
the class of false-done failure the quality protocol exists to kill. The rule:
- TIER 0, Skill 44 caf command line interface: the PRIMARY data plane for contact reads,
custom-field writes, and workflow enrollment.
- TIER 3, Skill 29 direct REST: MANDATORY for binary media uploads (there is no other tier
that performs multipart uploads), and the sub-agent-safe fallback for every Tier 0
operation.
- The official and community Model Context Protocol tiers are FORBIDDEN in the per-episode
path. Never escalate to them at runtime.
Escalation is Tier 0 to Tier 3 only, with the same private integration token. A 429 never
escalates anywhere: all tiers share one per-location rate bucket, so tier-hopping on a 429 is
self-harm. On a 429, full stop, read the retry window, schedule exactly one resume, and on a
second consecutive 429 hold-queue the job and alert the founder. Tool-bearing steps execute in
the podcast department agent's OWN turn; sub-agents handle pure content work only.
## Fish Audio facts (pinned; verify the header live at the canary)
- Current model is Drama-3, model id drama-3, selected via HTTP HEADER on POST
https://api.fish.audio/v1/tts with Bearer auth. The endpoint's enum documentation lags the
release blog, so the drama-3 header value is live-verified during the canary before any
client content depends on it.
- Voice is the client's OWN private voice model, selected by reference_id (one private voice
per client). Output is mp3 at 192 kbps. Set condition_on_previous_chunks true for long
episodes so chunked synthesis stays consistent.
- s2.1-pro-free exists but carries NO service level agreement and may train on inputs. It is
FORBIDDEN for production client content and the render module structurally refuses it.
- Delivery tags are free-form square brackets for S2.1 Pro (S1 legacy uses parentheses). Tag
density is roughly one tag every two to five sentences, concentrated at pivots, palette
governed by the respondent's stated tone.
## State vocabulary (podcast_state.py is the single writer)
Every state change in this engine is written by ONE writer, scripts/podcast_state.py, into
~/.openclaw/podcast-engine/podcast-engine.db (SQLite, WAL) and the intake ledger. No other code
opens the database read-write. The dashboard and the kanban READ this state; they never
recompute it. The status enum below IS the dashboard and kanban vocabulary and this runbook
uses it verbatim.
| status | Client-facing label | Pipeline steps it covers |
|---|---|---|
| `received` | Received | Webhook ingested; Step 0 first-run smoke test and Step 1 ingest |
| `researching` | Researching | Step 3 Research Assistant stage |
| `writing` | Writing | Steps 2, 4, 5, 6, 7, 8 (engines, sizing, blueprint, draft, improvement, read-aloud) |
| `in_qc` | Quality review | Step 9 quality control; increments `attempt_count` per failed attempt |
| `generating_art` | Creating artwork | Step 10 Kie.ai cover plus ffmpeg finalize |
| `producing_audio` | Producing audio | Step 11 Fish Audio synthesis and mastering |
| `publishing` | Publishing | Steps 12 to 16 (documents, book teaser, media upload, Podbean, link-back) |
| `enrolling` | Finalizing | Step 17 enrollment or Personal spreadsheet update |
| `complete` | Live | Step 18 delivered; `completed_at` set; terminal |
| `failed` | Needs attention | Three-strike QC stop or unrecoverable failure after the engine's own retries; founder already alerted; terminal unless re-dispatched through the engine |
| `queued_credit_out` | On hold | A paid service reported insufficient credits mid-run; `queue_state='held'`, `resume_stage` records where to resume; 60-day maximum |
Legal transitions (the writer enforces this matrix; anything else raises):
- Forward path: received to researching to writing to in_qc to generating_art to
producing_audio to publishing to enrolling to complete.
- QC loop: in_qc to writing (targeted revision) up to three attempts, then in_qc to failed.
- Any non-terminal stage to queued_credit_out; on credit restore, queued_credit_out to
resume_stage with queue_state='resumed'.
- Required-outputs gate: a forward advance that LEAVES a producing stage is refused (exit 3)
until that stage's deliverable artifact(s) are recorded, so no job can reach `complete` (or
slip past publishing) with no stored audio and no Podbean permalink. The requirement set is
resolved per job from its preset flags, so a document-only preset (Season-Strategy) and a
non-publishing preset (Episode Asset Pack) are never falsely blocked. `advance --force-waiver
"<reason>"` overrides the gate and writes an audit event -- including the operator's reason --
to the job event log; nothing is ever waived silently.
- 60-day cap: queued_credit_out to failed with queue_state='aged_out', payload purged, founder
notified.
- Any stage to failed on an unrecoverable error after the engine's own retries.
Writer subcommands the pipeline calls (never bypassed):
podcast_state.py create --client-id --location-id --contact-id --mode --style \
--payload-file <json> [--show-name --host-name]
podcast_state.py advance --job-id --to <status> [--note ...] [--cost-delta 0.12] \
[--force-waiver "<reason>"] # override the required-outputs gate;
# optional operator reason, audited
podcast_state.py output --job-id --field <output_column> --value <url|text|number>
podcast_state.py hold --job-id --service <kie_ai|ollama_cloud|openrouter|fish_audio>
podcast_state.py resume --job-id
podcast_state.py fail --job-id --step <name> --error <sanitized text>
podcast_state.py sweep-aged-out
podcast_state.py scrub-pii --job-id | --client-id
podcast_state.py token mint|revoke|list --client-id ...
podcast_state.py deactivate-client --client-id --note ...
Idempotency: the inbound handler computes a submission fingerprint and job key before creating
a job; a UNIQUE (client_id, submission_fingerprint) constraint plus the intake ledger's
exclusive-create claim make a redelivered webhook a no-op. A redelivered webhook can never make
a second episode. A one-answer change produces a new job key and therefore a new episode.
### Webhook / intake authentication
Inbound webhook payloads are verified with HMAC-SHA256 via the shared secret
`PODCAST_INTAKE_INBOUND_SECRET`. Every inbound request must carry an
`X-Podcast-Intake-Signature` header formatted as `sha256=<hex digest of the raw
payload bytes>`. Verification runs BEFORE any parsing: the handler hashes the
raw bytes with HMAC-SHA256 and compares using `hmac.compare_digest` for timing-
attack resistance. When the secret IS configured, the handler FAILS CLOSED:
missing or invalid signatures are rejected with no flow created and the
rejection logged. When the secret is NOT configured, the handler logs a one-line
warning and proceeds (backward compatibility for existing unsigned senders).
## Activation layer (a queued flow never runs itself)
Intake is not production. The webhook layer records a submission, claims the
ledger, and creates ONE TaskFlow per accepted submission (the flow key IS the
job_key), and that flow is created QUEUED. The platform never auto-runs it: a
queued flow sits until the bound session gets a turn that executes the pipeline.
Turning queued flows into running episodes is the job of the ACTIVATION LAYER,
and the failure mode when any piece is absent is the worst one the engine can
show a client: intake succeeds, the card says Received, and nothing is ever
produced.
WHAT ACTUALLY GIVES THE SESSION THAT TURN (the piece this section used to leave
unnamed, and the reason the two statements below it used to contradict each
other). The inbound POST from the client's Convert and Flow workflow lands on
the GATEWAY HOOKS INGRESS, `POST /hooks/podcast-intake-<client-slug>`, carrying
a flat survey body and an `Authorization: Bearer <hooks token>` header. A
gateway hook MAPPING, written by `register-podcast-hook.sh` into
`hooks.mappings[]`, matches that path and dispatches ONE turn of the client's
podcast department agent in session `podcast:intake:<client-slug>`
(`action: agent`, `sessionMode: persistent`, `wakeMode: now`, `deliver: false`).
That turn is the trigger: it writes the payload to a file, runs
`webhook/intake_handler.py --mode trigger-flow`, and then drives
`podcast_step_driver.py next` per SOP-PODCAST-01 Section 8. The gateway answers
the POST as soon as the turn is ADMITTED, never when the episode is finished, so
the upstream sender is never held open.
The Webhooks plugin route (`POST /plugins/webhooks/podcast-intake-<slug>`) is a
DIFFERENT surface with a different job: it is the durable TaskFlow CONTROL
surface, used from inside the agent's own turn, and it accepts only the
`{"action":"create_flow", ...}` envelope. The upstream survey sender must never
post there; a flat body gets
`action: Invalid discriminator value. Expected 'create_flow'`.
NO-DAEMON DESIGN (binding, per webhook-design.md Section 7). There is NO
controller daemon, NO scheduler daemon, and NO queue poller. The podcast
department agent that owns session podcast:intake:<client-slug> advances each
flow in its OWN turn: the intake route's controllerId runbook opens with ONE
deterministic first step, scripts/webhook/intake_handler.py --mode in-flow,
and continues the 18-step pipeline in the same session. The act-2 controller
daemon was EXCLUDED from this campaign as a design violation; no file named
podcast_controller.py or podcast_scheduler.py is part of this engine, and a
guard or verifier that requires one is a gate-contract error. The runbook's
mechanism for Steps 2-18 is the DETERMINISTIC STEP DRIVER,
scripts/podcast_step_driver.py: the controllerId runbook calls
`podcast_step_driver.py next --job-id <id>` in the agent's OWN tool-bearing
turn, the driver emits the EXACT next command (deterministic steps call the
production script directly; content steps emit the model_router.py route the
agent fills from the runbook), and the agent records every stage change
through podcast_state.py advance. The step driver is a TOOL the agent calls,
not a resident process: no daemon, no cron, no poller. Three build
files make up the activation layer, in dependency order:
| Component | What it does | Concrete pointer |
|---|---|---|
| `register-podcast-hook.sh` | Installs the per-client intake route, the gateway hook MAPPING that turns an inbound POST into one turn of the podcast session, and the allow-list bindings | `scripts/webhook/route-template.json5` (the live-verified route schema) |
| `install-podcast-department.sh` | Installs and binds the podcast department agent (director-of-podcast) that owns the bound session | wiring.json `department` and `session_binding` blocks |
| `webhook/intake_handler.py` | The deterministic first step of the controllerId runbook: maps, tenant-checks, dedup-claims, persists the payload to the intake ledger, BRIDGES it into the SQLite job roster via `podcast_state.py create --job-key` (accepted AND test paths; idempotent; a failed bridge never fails the fast-ACK — it parks the flow, raises the sqlite_bridge_failed operator alert, and writes a repair instruction into the ledger note), then advances the flow into Step 1 (or closes it for duplicate / needs_input / test) | `scripts/webhook/route-template.json5` controllerId runbook plus `scripts/webhook/flow_client.py` |
1. register-podcast-hook.sh, INTAKE ROUTE PLUS SESSION BINDING. Installs the
per-client Webhooks plugin route into the gateway config
(plugins.entries.webhooks.config.routes, verified schema in
scripts/webhook/route-template.json5): route id podcast-intake-<client-slug>,
path /plugins/webhooks/podcast-intake-<client-slug>, bound sessionKey
podcast:intake:<client-slug>, secret by env SecretRef (ENV LABEL
PODCAST_INTAKE_HOOK_SECRET only, never a plaintext value), controllerId
webhooks/podcast-intake-<client-slug>. The bound session is the route's only
consumer: allowedAgentIds is the podcast agent only and
allowedSessionKeyPrefixes is the podcast session namespace only. Config is
written as the node user, never root (a root-owned config freezes the
gateway). `--remove <slug>` is the symmetric unregistration that churn calls
(SOP-PODCAST-03; scripts/revoke-podcast-client.sh invokes it).
It ALSO writes the gateway hook mapping that actually triggers production:
hooks.mappings[] id podcast-intake-<client-slug>, match.path
podcast-intake-<client-slug>, action agent, agentId dept-podcast,
sessionKey podcast:intake:<client-slug>, sessionMode persistent, wakeMode
now, deliver false, allowUnsafeExternalContent false, and a deterministic
messageTemplate. That mapping is the only thing that converts a Convert and
Flow survey POST into a podcast agent turn; the plugin route alone never
did, because it only accepts the {"action":"create_flow"} envelope while the
survey sender posts a flat body. It also enables the hooks ingress and, when
no hooks token exists, points hooks.token at the SAME env label as the
route's SecretRef (${PODCAST_INTAKE_HOOK_SECRET}), so onboarding manages ONE
secret. An existing hooks token belonging to another integration is never
overwritten. scripts/provision-podcast-client.sh delegates its hook-mapping
step to it, and verifies it with `register-podcast-hook.sh --verify
--client-slug <slug>`.
2. install-podcast-department.sh, DIRECTOR AGENT. Installs the client's podcast
department agent, the agent that owns session podcast:intake:<client-slug>
and embodies director-of-podcast. wiring.json forbids a second podcast
department (the podcast department already exists on the 28-department
universal floor, content-creator pack, universal_primary true; creating a
duplicate is a build failure), so the installer ATTACHES the engine to the
existing department, never creates a new one. This agent is the controller
session: every tool-bearing step (Convert and Flow REST, Podbean publish,
custom-field writes, Skill 44 enrollment) executes in its OWN turn, never in
a run_task(runtime="subagent") child, because sub-agents get no tools at all.
3. webhook/intake_handler.py, THE DETERMINISTIC FIRST STEP. The controllerId
runbook's first step: ONE Bash call, no language model, no Model Context
Protocol. It maps the payload, tenant-checks it, dedup-claims it through the
intake ledger, persists it, BRIDGES it into the SQLite job roster
(podcast_state.py create --job-key <k>; the bridge is what the command
center dashboard and the kanban board read, so a job that never bridges is
invisible to both), and then either advances the flow into Step 1 or
closes it (duplicate / needs_input / test / wrong-tenant delivery).
BRIDGE REPAIR: if the ACK shows bridge=error, the job exists only in the
file ledger. Repair with `podcast_state.py create --job-key <job_key>
--payload-file <ledger payload>` (idempotent; the ledger note carries the
exact command). In the
primary in-flow path the plugin has already created the flow and the handler
is its first deterministic step, so the department agent's own turn simply
continues the runbook from there; in the degraded trigger-flow path the
handler creates the managed flow itself, with identical own-turn
advancement. Step 14 stores media in GHL and records the URLs; Step 15 publishes from
those exact URLs; the controller never passes a URL it did not get from Step 14's state.
The 18-step advance contract stays with the agent's own turn:
get_flow (flow_client.py) to read the flow, derive the current pipeline step
from the state podcast_state.py wrote, drive the next step, record EVERY
stage change through podcast_state.py advance, then resume the flow under
the 409 read-check-reapply contract (expectedRevision; re-read before
re-applying; never a blind retry). podcast_state.py is the SOLE state
writer; the runbook sequences steps and writes nothing directly. On
insufficient credits it holds through podcast_state.py hold and parks the
flow with set_waiting; on an unrecoverable error it fails both. The kanban
card mirrors each stage through cc_board.py (run-begin, patch-phase, close);
the board is display-only and never recomputes state. The QC independence
rule binds here: the Step 9 judge persona and judge tier are never the
drafting persona or the writer tier.
No scheduler daemon, no heartbeat poller. Advancement is EVENT-DRIVEN: the
inbound POST matches the gateway hook mapping, which dispatches ONE turn of the
bound session; that turn runs the deterministic intake handler and then the
step driver, and the platform's own flow machinery resumes set_waiting
flows. Furnace
constraint (guard-cron-inventory.py is binding): this engine registers NO
per-client cron, never adds a second cron, a queue poller, a per-job watcher,
or anything sub-daily; the client's ONE recurring job remains the daily smoke
test (podcast-smoke-test.py via openclaw cron, per provision-podcast-client.sh).
Wiring source of truth. Every name above resolves against ONE machine-readable
file: `23-ai-workforce-blueprint/department-wiring/podcast-engine/wiring.json`.
It owns the department binding, the session_key_template and route_id_template,
the flow identity (one TaskFlow per accepted submission; the flow key IS the
job_key), the persona ownership (director-of-podcast owns Steps 0, 1, 2, 12 to
16, 17, 18 and the statuses received, researching, publishing, enrolling,
complete, failed, queued_credit_out), the four-tier access matrix, and the
kanban contract, with `verify-podcast-engine-wiring.py` as its enforcement
script. A document or script that disagrees with wiring.json is the side that
is wrong. The department-and-persona plain-language companion is the README.md
in the same folder.
Activation order and canary. Register the route, install the department agent,
in exactly that order (each step's verify is in SOP-PODCAST-01 Section 8).
There is no scheduler to arm: advancement fires on the intake event itself.
Verification is ONE observed move: a _test-gated canary submission must land on
the route, be claimed by the ledger, create the job, and ADVANCE past
`received` on the intake turn. A job that stays `received` with its flow still
queued means one of the three components is absent or mis-wired; the canary
lifecycle checklist is
`23-ai-workforce-blueprint/department-wiring/podcast-engine/card-lifecycle-proof-plan.md`.
## Step ownership (binding)
Director of Podcast (`director-of-podcast`) owns the run end to end, the kanban card, preset
selection, and the three-strike escalation to the founder. Per-step specialist ownership is
shown below; every step listed as `director-of-podcast` is the default lane when no specialist
is assigned.
| Step | Name | Owning role |
|---|---|---|
| 0 | First-run smoke test | director-of-podcast |
| 1 | Ingest | director-of-podcast |
| 2 | Select engines | director-of-podcast |
| 3 | Research Assistant stage | research-assistant |
| 4 | Size | director-of-podcast |
| 5 | Blueprint | podcast-host |
| 6 | Draft | podcast-host |
| 7 | Improvement pass | podcast-host |
| 8 | Read-aloud pass | podcast-host |
| 9 | Quality control (episode gate) | qc-specialist-podcast |
| 10 | Cover art | audio-post-producer |
| 11 | Audio | audio-post-producer |
| 12 | Documents | director-of-podcast |
| 13 | Book teaser (Interview only) | director-of-podcast |
| 14 | Store media | director-of-podcast |
| 15 | Publish to Podbean | director-of-podcast |
| 16 | Link back | director-of-podcast |
| 17 | Trigger and enroll | director-of-podcast |
| 18 | Deliver | director-of-podcast |
The qc-specialist-podcast at Step 9 MUST be a different persona from whichever persona drafted
(Steps 5 to 8); the independence rule is non-negotiable. podcast-producer supports
director-of-podcast for Season-Strategy presets. podcast-editor and mastering support
audio-post-producer repair passes at Steps 10 and 11.
## The canonical 18-step pipeline
Step 0 runs once per client before their first episode; Steps 1 to 18 run per episode. Every
step records its transition through podcast_state.py, meters every billable call through
podcast-cost-ledger.py against the ceilings, and routes every failure alert through
alert-dedup.py to the founder only. Nothing is ever silently dropped: a delayed episode is
acceptable, a lost one is not.
STEP 0, FIRST-RUN SMOKE TEST (once per client, not per episode). ghl_credential_gate.py full
mode confirms the custom field map fields exist by exact key (including the double underscore
in podcast_survey__additional_info), the client's own private integration token and Location ID
resolve and pair-prove against the Location, and Podbean, Fish Audio (key plus reference_id),
and Kie.ai credentials are present. Missing custom fields STOP setup and route the client to
support for the snapshot; the engine never creates fields silently. A standing pre-check also
runs here: POST client_last_name plus client_email to the operator's
`/webhook/podcast-standing-check` endpoint (the same shared header token Step 15 uses). NOT in
good standing STOPS setup before any credit is spent; the client's agent is told exactly
"you are not in good standing" and no field or credential work proceeds. Endpoint unreachable
at this pre-check is fail-OPEN (proceed and log); only Step 15's publish gate is fail-CLOSED
and authoritative.
STEP 1, INGEST. status `received`. A per-episode standing pre-check runs BEFORE any Step 2-plus
work: the same `/webhook/podcast-standing-check` call as Step 0, keyed on client_last_name plus
client_email. NOT in good standing sets status `blocked_standing`, tells the client's agent
exactly "you are not in good standing", spends no credits, deletes nothing already produced, and
resumes cleanly (idempotent re-fire of the same job key) the instant standing returns to YES.
Endpoint unreachable here is fail-OPEN (proceed and log); Step 15's publish gate remains the
fail-CLOSED, authoritative check. Otherwise: read every survey answer per the custom field map:
style, mode, thesis, tone, the transparency answer, the preferred pronoun (which governs every
reference to the speaker or guest), stories and quotes, additional info, guest first name for
Interview, and release date. Compute the job key, claim the intake ledger, resolve the output
preset. Duplicate deliveries are acknowledged without a second run. Missing required fields are
raised to the OPERATOR, never guessed.
STEP 2, SELECT ENGINES. status `writing`. Load the matching Style Engine (Counter Intuitive,
Vulnerable, Provocative, or Passionate) and Mode rules; confirm arc beats and proportional word
budgets. The engine's arc, persuasion mechanism, and FORMAT are unchanged by this; per the D1
binding ruling (Skill 6 U98) the script's WRITTEN VOICE is GOVERNED by the blend directive;
`scripts/blend_voice_governance.py` resolves it for the selected engine before STEP 6 DRAFT.
STEP 3, RESEARCH ASSISTANT STAGE. status `researching`. Improve and expand every answer without
changing intent, extract three power statements in the respondent's voice, generate the missing
takeaways and findings, and research up to three REAL verified case studies (demographic-matched
where applicable). Use the best available web research tool and name it honestly in the delivery
report; state the limitation plainly if none is wired. Capped at 12 calls. The research package
is FROZEN after this step; every QC retry reuses it. A fabrication failure later unlocks at most
one supplemental research pass of at most four calls.
STEP 4, SIZE. status `writing`. Choose a runtime in the 7 to 15 minute range at 140 words per
minute; 10 minutes (about 1,400 spoken words) is the default sweet spot. Thin material means a
tight short episode, never padding.
STEP 5, BLUEPRINT. status `writing`. Internal only. Title (compelling, edgy, never preceded by
the word Title, immutable after this step), one-sentence thesis, the style signature line
verbatim, every arc beat with content and a word budget summing to the chosen total,
transparency-beat placement, case-study and power-statement placement, opening and final lines
written first.
STEP 6, DRAFT. status `writing`. Full script in Final Draft format: prose only, everything
speakable, numbers and symbols written as spoken, Fish Audio square-bracket tags embedded per
the tagging strategy (roughly one tag every two to five sentences, concentrated at pivots,
palette governed by the respondent's stated tone).
STEP 7, IMPROVEMENT PASS. status `writing`. More compelling, more disruptive, more emotionally
captivating, tone enforced in every paragraph. Forbidden from changing the title or thesis,
removing the transparency beat, adding fabricated material, or inflating length.
STEP 8, READ-ALOUD PASS. status `writing`. Fix anything a mouth would stumble on at speaking
pace.
STEP 9, QUALITY CONTROL (episode gate). status `in_qc`. All 16 Tier 1 hard-fail checks, then
all 10 rubric dimensions at 8 or higher with no averaging, then the honest per-episode
checklist. qc-tier1-mechanical.py runs the deterministic checks at zero model cost; the
semantic checks (fabrication, mode perspective, pronoun correctness) and the rubric run on the
distinct judge tier. qc-attempt-gate.py owns the attempt counter: targeted revisions only (the
frozen research is reused), a hard stop at three failures with a founder notification carrying
the failing checks and the best draft. The QC persona is qc-specialist-podcast and MUST be a
different persona from whichever persona drafted (independence rule).
STEP 10, COVER ART. status `generating_art`. Kie.ai GPT-Image 2.6 (Skill 66 registry id `gpt-image-2-6/sunburst-text-to-image`, the AGENTS.md N43 pin; Skill 57 prompt 14 carries the same id and payload), 2K square (2048), prompt built
from the respondent's visual description anchored by the episode theme and title; poll with the
bounded backoff schedule; then ffmpeg in-house: confirm square, resize into the 1500 to 3000
range, JPEG, RGB, under 512 kilobytes, spec-valid filename. Never below 1500 square.
STEP 11, AUDIO. status `producing_audio`. Fish Audio drama-3 via header with the client's own
reference_id, mp3 at 192; split at natural beat boundaries only if a per-request limit demands
(never mid-sentence, never mid-tag), condition_on_previous_chunks true, ffmpeg-join seamlessly,
master to the Skill 23 loudness doctrine (minus 14 to minus 16 LUFS integrated), verify with
ffprobe. The Skill 35 render script's retry-plus-verify pattern is the base. Filename is the
client name first, then the episode title. The free tier is structurally refused.
STEP 12, DOCUMENTS. status `publishing`. Detect tooling (Google preferred, then Notion, then
plain text last resort). Episode Package rich and fully rendered with no font below 12 point;
Speech Script clean text only. Where Google is the destination, sharing is set to anyone with
the link can edit. Step 12 PERFORMS the delivery as a two-tier chain and records every id and
link in the documents plan, so Step 16 LINK BACK writes real links. TIER 1 is Google Drive
through the client's own Skill 14 credentials (`GOOGLE_APPLICATION_CREDENTIALS` or
`GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` plus `GCP_IMPERSONATE_USER` or `GWS_ACCOUNT`, with an
optional `PODCAST_DRIVE_ROOT_FOLDER_ID` destination folder). TIER 2, when Skill 14 is not
configured on the box or the Drive call delivers nothing, is the client's OWN Notion
(`NOTION_API_TOKEN` plus an explicit client-owned parent page, the `37-zhc-closeout` contract):
one `Podcast Episodes` page, then one page per episode, created idempotently, with the published
audio LINKED because the Notion API cannot upload a file. TIER 3, neither configured, keeps the
intent-only record and logs ONE line naming both prerequisites. No tier fails the episode. The
agency token and agency parent page are refused, and the gws binary is never invoked because a
bare headless gws call wipes the box's credential store. See `INSTALL.md`,
`modules/documents.md` and SOP-PODCAST-02 section 2.10.
STEP 12.5, SHOW NOTES. status `publishing`. Draft thorough, enticing show notes (800 to 2500
characters) from the FROZEN research package and the blueprint alone -- thesis, power statements,
takeaways, and case studies -- routed through `model_router.py route` on the CONTENT tier (Kimi
2.6, then GLM 5.2; never an Anthropic model). Honor the writing rules for every produced output:
zero em dashes, no triple backtick or code-fence markers of any kind. This is the ONE source of
the Podbean description: a show note shorter than the 200-character floor is a defect, never
publishable. Persist via `podcast_state.py output --field episode_description`; Step 15 resolves
it from the ledger by default. The silent title-substitution fallback in the publish script is
dead for real publishes -- a real episode always carries a real description.
STEP 13, BOOK TEASER (Interview mode ONLY; Personal mode skips entirely). status `publishing`.
First-chapter book intro, at most three pages, in the person's own voice, ending on a
cliffhanger, built only from what they shared plus verified research, written on Kimi 2.6 or
GLM 5.2, rendered as a book-typeset PDF with no font below 14 point. The book teaser is the
coup de grace of the SHUA experience.
STEP 14, STORE MEDIA. status `publishing`. Tier 3 REST upload of the MP3, cover, and teaser PDF
into the client's Convert and Flow media library folders (podcast, podcast images, podcast
episodes; create-once, reuse-forever, case-insensitive matching); HEAD-verify every returned
public URL. Runtime never depends on folder creation succeeding mid-episode; it only looks up
folders that setup ensured. OUTPUT CONTRACT: every URL `scripts/caf/media_upload/upload_media.py` returns must be
persisted to the job ledger via `podcast_state.py output --field mp3_media_url` and
`podcast_state.py output --field cover_image_url`. These fields are the sole handoff into
Step 15.
STEP 15, PUBLISH TO PODBEAN. status `publishing`. Publishing uses BlackCEO's SINGLE Podbean
OAuth app (client_id and client_secret). The operator HOSTS every client's show under his ONE
Podbean account, so those app credentials are NEVER the client's, are NEVER asked from the
client, and NEVER need to sit on the client box. INPUT CONTRACT: Step 15 resolves `--audio-url`
/ `--image-url` from `mp3_media_url` / `cover_image_url` in the job ledger by default; the CLI
flags are an explicit override for repairs only. `podbean_publish.sh` verifies them against
Step 14's recorded state. The fleet DEFAULT transport is publish-proxy:
`podbean_publish.sh` posts the contract v2 payload (channel id, client last name, client email,
title, description, audio_url, image_url, publish_date, idempotency_key, options) with the
shared header token straight to the operator's n8n `/webhook/podbean-publish`, which runs the
good-standing plus identity gate, mints the channel-scoped Podbean token server-side, and
returns the permalink synchronously in the same response; no client-box Podbean call and no
client-box OAuth mint. The publish step resolves its audio and image URLs from the job ledger
(mp3_media_url / cover_image_url columns) recorded by Step 14's scripts/caf/media_upload/upload_media.py via
podcast_state.py; the --audio-url / --image-url CLI flags are the step's own provenance assertion
and must match the ledger when both are present. Precedence is proxy first; the n8n Podbean credential broker
(config/n8n/podbean-broker.workflow.json, which mints a short-lived access token SCOPED to the
client's channel, Podbean multiplePodcastsToken) is the fallback; a local client_credentials
mint on the operator's own box only is last. The ONE Podbean value the client supplies is their
Podbean Channel ID (podcast_id) - it selects which show under the host account is theirs and is
not a secret; the publish gate routes on the operator's roster row for that identity, never on
the raw payload value alone (the good-standing roster is runtime data, lives only in n8n, and
is never committed to this repo). NOT in good standing at this gate refuses with exactly
"you are not in good standing"; nothing already produced is deleted, and a standing flip back
to YES lets the same idempotency_key resume cleanly. Episode number is count plus one; the
title convention appends "Inspired by" plus the speaker's name; create the episode (published
immediately, or scheduled when the release date is future); capture the permalink from the
response. Idempotent: a repeated idempotency_key returns the stored permalink instead of a
second episode; the ledger's own permalink skip (if the ledger already holds a permalink,
skip) remains a second, independent guard.
Sovereignty exception (carried verbatim from the Skill 58 server-side-publish spec Section 0;
a future agent must NOT "fix" this back to client-owned credentials, that would be introducing a
defect, not fixing one):
> The standing fleet rule is: clients own their own credentials; the operator never pays for,
> holds, or substitutes a client's provider account. Podbean is a deliberate, operator-ratified
> EXCEPTION to that rule. Every client's podcast show is hosted as a channel under the operator's
> ONE Podbean account. The Podbean OAuth app `client_id`/`client_secret` are the operator's
> single shared app. This is intentional and correct; it is the documented doctrine of the skill
> itself... A future agent that "corrects" this back to client-owned Podbean credentials is
> introducing a defect, not fixing one. The client-owned-OAuth idea exists only as a recorded
> someday-option; it is NOT this spec.
STEP 16, LINK BACK. status `publishing`. Write the title, description, Episode Package link, and
Speech Script link (and the book_teaser link when that field exists) in ONE batch, then write
the episode URL field ALONE and LAST because it is a live customer-facing trigger for the
downstream workflow. Read back every field byte-for-byte; a mismatch retries once, then enters
failure handling.
STEP 17, TRIGGER AND ENROLL (mode-dependent). status `enrolling`. Interview: verify whether the
URL write already field-triggered the "podcast is completed" workflow, enroll explicitly only
if not, enroll the "podcast episode is ready" workflow per the discovered trigger mechanism, and
verify both via caf reads. Personal: append the episode row to the running spreadsheet, no
workflows, no messages. A hard mode guard in code refuses workflow enrollment in Personal mode.
STEP 18, DELIVER. status `complete`. The deliverable is the pure script plus links. The delivery
report (title, honest word count, runtime, style, mode, writing model including any
substitution, research tool, document destination and links, media locations, Podbean link,
Convert and Flow save confirmations, enrollment confirmation, image prompt, completed
checklist, rubric scores) goes to the OPERATOR channel only, never inside the script, never to
the customer. The engine STOPS here. Convert and Flow owns all messaging.
## The four output-type presets
A preset is a named bundle of mode, pipeline scope, and deliverable set, selected at intake and
carried in the canonical payload and the ledger (default derivable from mode when absent).
Presets 3 and 4 are thin variations over the SAME pipeline and state machine, not separate
systems.
1. INTERVIEW (mode: interview_style_podcast). Full 18-step run. Deliverables: published
episode, cover, Episode Package, Speech Script, book teaser PDF, workflow enrollment. This
is the SHUA lead generation lane.
2. SOLO (mode: personal_podcast_style). Full run minus the teaser and the workflows; the
running spreadsheet is updated instead. The client's own weekly episode in the cloned voice.
3. SEASON-STRATEGY. A planning deliverable, not an episode: season arc, episode slate, style
and mode per slot, drawing on the Skill 23 director-of-podcast doctrine. Runs the research
stage and the build gate's document quality checks; skips Steps 6 to 17; produces an Episode
Package-style strategy document only. No render, no publish.
4. EPISODE ASSET PACK. Regenerates or completes the asset set (cover, documents, teaser) for an
EXISTING episode without re-writing or re-publishing audio; idempotent against the ledger.
Useful for repairs and for the sanctioned Skill 57 social-packaging handoff.
## The two quality gates (never conflated, never averaged)
There are TWO gates and they are never substituted for each other. One decides whether BUILD
WORK merges; the other decides whether an EPISODE ships. A build unit scoring 9.0 says nothing
about an episode, and a perfect episode says nothing about merge readiness.
GATE A, BUILD/MERGE. The fleet 10-category rubric at threshold 8.5. Below 8.5 the executing
agent fixes the work and re-runs; at or above 8.5 the work pushes and merges. The rubric decides
quality; nobody asks the founder for a green light the rubric already grants. Riding with Gate
A: guard-no-anthropic-runtime, guard-cron-inventory, the content-hash restamp gate, the
annotated-tag gate, the fleet-wide client-name grep, and the update.sh skill-count check.
GATE B, EPISODE. Three instruments in order: the 16 Tier 1 hard-fail binary checks (any single
failure means NOT deliverable), then the 10-dimension quality rubric at 8 or higher on EVERY
dimension with no averaging, then the honest per-episode checklist reproduced in the delivery
report. Independence: the judge tier is distinct from the writer tier and qc-specialist-podcast
is a different persona from the drafter. Read protocol: three passes with different jobs
(mechanics and forbidden content; structure and fidelity; full read-aloud at speaking pace),
none skipped because the episode feels done. Failure loop: targeted revision only, hard stop at
three attempts, founder notified through alert-dedup with the failing checks and the best draft.
Standards are never relaxed to resolve a three-strike failure.
The 16 Tier 1 checks, in one line each: 1 zero em dash characters; 2 no triple backticks or
code-fence markers; 3 no markdown in the script; 4 no labels or speaker prefixes or stage
directions; 5 the word Title never precedes the title; 6 speakable characters only; 7 tag
syntax integrity for the target model; 8 word and character counts recomputed with tags
stripped; 9 word-count honesty; 10 no forbidden reference-speaker names, books, or talks; 11 the
style-forbidden word never appears; 12 no fabrication anywhere; 13 mode perspective correct
(Personal first person throughout, Interview host first person and guest third person by name);
14 pronoun correctness against the stated preferred pronoun; 15 pure deliverable, the episode and
nothing else; 16 no intake contamination.
## Role bindings (Skill 23 personas; do not invent parallels)
Access follows the chain of custody. The podcast department (id `podcast`, universal_primary
true, on the universal floor) is the OWNER; the intake session binds to its agent.
- director-of-podcast owns the run end to end, the kanban card, preset selection, and the
3-strike escalation to the founder.
- podcast-host is the voice-and-framing persona consulted for Personal mode tone fidelity and
Interview mode show framing (Steps 5 to 8).
- audio-post-producer owns Steps 10 and 11 (art finalization, render, stitch, LUFS mastering)
plus media quality control; podcast-editor and mastering support repair passes.
- qc-specialist-podcast owns Step 9 and MUST be a different persona from the drafter.
- podcast-producer supports director-of-podcast for Season-Strategy presets.
Read-only downstream consumers: the social and marketing departments may read completed episode
records and published links (the Episode Asset Pack preset is the sanctioned handoff) with ZERO
write access to the pipeline or its state. The master agent ROUTES inbound podcast jobs to the
podcast department and never executes a pipeline step. Sales, finance, legal, and
personal-assistant departments get NO access; customer messaging belongs to Convert and Flow.
## Cost and furnace guardrails (bounded by design)
- Ceilings: soft 2.50 and hard 5.00 dollars per episode, 15.00 per client per day, at most 3
episodes per client per day, 400,000 content tokens per episode, 8,000 output tokens per call.
- Exactly ONE recurring cron per client: a daily smoke test (client morning, jittered, at most
1 cent per run, balance endpoints only, never model turns) that also ages and drains the
credit-out queue. No heartbeat entry ever, no queue poller, no per-job watchers; the dashboard
triggers nothing. guard-cron-inventory.py enforces this and a departed client leaves zero
recurring jobs.
- Research runs ONCE and is frozen; QC retries are targeted, not full rewrites (worst case about
1.6x a single write). Tier 1 QC is deterministic string work at zero dollars. Web research is
capped at 12 calls per episode.
- Alert dedup: one alert per client-service-failure class per 6-hour window, at most 4 founder
alerts per client per day, then a digest. All Telegram goes through the gateway only.
## Loop engineering (continuous and self-correcting)
Every episode is a durable state machine (TaskFlow plus intake ledger plus SQLite). Every
failure has a typed handler: a QC failure loops through targeted revision to the 3-strike cap; a
credit-out holds the job with full payload and partial state and resumes from resume_stage on
credit restore (60-day maximum, daily age-check); a rate limit full-stops and reschedules; a
crash resumes idempotently from the last recorded state. The daily smoke test is the loop's
heartbeat substitute: one bounded probe that also drains the queue. Nothing is ever silently
dropped.
## Writing rules (verbatim, enforced by qc-tier1-mechanical.py)
Binding on this document and on everything the skill ever produces:
- ZERO em dash characters anywhere.
- NO triple backtick fences and no code-fence markers of any kind inside any produced JSON,
HTML, or script output.
- NO markdown inside a produced script: no asterisks, headers, bullets, numbered lists, or bold
or italic markers.
- Final Draft format for every script: prose only, everything speakable, numbers and symbols
written as spoken, no labels, no speaker prefixes, no stage directions, the title woven into
natural speech and never preceded by the word Title.
- Word-count honesty is absolute: the true spoken count is reported with tags stripped;
misreporting any check is an absolute failure. Genuine input limitations are noted plainly,
never faked into a pass.
## The two-show model (binding; fleet-wide)
Every client runs TWO shows under BlackCEO's SINGLE Podbean host account, one channel per
show. This is the fleet-wide convention, not a per-client exception:
- The PERSONAL show carries the client's solo episodes and runs mode personal
(personal_podcast_style, default preset solo). Episodes this mode produces publish to the
client's personal-show channel.
- The INTERVIEW show is the guest system (the SHUA lead-generation lane) and runs mode
interview_style_podcast (default preset interview). Episodes this mode produces publish to
the client's interview-show channel.
Channel selection by mode, stated once: personal resolves the client's personal-show channel;
interview resolves the client's interview-show channel. The payload's podcast_id carries the
channel selected by mode, and every downstream consumer (env resolution on the client box,
the operator's roster, the n8n publish and standing gates) keys on that value exactly as Step
15 describes. Modes/personal.md and modes/interview.md each name the show and channel their
mode targets; SKILL.md is the authority when they drift.
Env convention: PODBEAN_PODCAST_ID holds the DEFAULT channel (the one the publish-proxy
trigger uses when no explicit channel is resolved), and each additional show gets its own
PODBEAN_PODCAST_ID_<SHOW_SLUG> variable, where SHOW_SLUG is the show name in upper snake
case, for example PODBEAN_PODCAST_ID_SOFT_GIRL_ERA for the interview show. The engine
resolves the variable whose show matches the episode's mode and never publishes a personal
episode to the interview channel or the reverse; a mode-to-channel mismatch is a provisioning
defect to fix, never something the engine works around.
Roster convention: the good-standing roster podcast_publish_roster (table id UWjpksxU2b6TjKow)
holds ONE ROW PER SHOW. Both of a client's rows carry the SAME identity tuple (email plus
last_name, the exact tuple the publish gate matches on) and good_standing=YES, and they differ
only by podbean_channel_id. A client with a single row remains fully supported: the gates
select the row whose podbean_channel_id matches the payload's podcast_id, and fall back to
the first matched row when no channel match exists (channel-preference with legacy
fallback). That fallback preserves single-row client behavior EXACTLY and is what the n8n
gates implement; it never weakens the fail-closed semantics: identity must match, standing
must be YES, and a non-matching identity still refuses with exactly "you are not in good
standing".
## Publish contract: the mode-selected channel is the payload's podcast_id
Every client runs TWO shows under the operator's single Podbean host account
(the two-show convention above), and the publish step (Step 15) never uses
one fixed channel for both modes: it passes the channel selected BY MODE as
the payload's podcast_id, and every downstream consumer keys on exactly that
value.
- Personal mode (personal_podcast_style) publishes to the client's
personal-show channel: scripts/podcast_channel.py resolves
PODBEAN_PODCAST_ID (the default channel).
- Interview mode (interview_style_podcast) publishes to the client's
interview-show channel: scripts/podcast_channel.py resolves
PODBEAN_PODCAST_ID_<SHOW_SLUG>, where SHOW_SLUG is the interview show's
slug in uppercase, underscore form (for example
PODBEAN_PODCAST_ID_SOFT_GIRL_ERA).
The resolver never guesses a channel id and never borrows the other show's
channel: when the mode's channel env var is absent it refuses, naming the
exact missing variable (a provisioning defect to fix, never something the
engine works around). Step 15 runs podbean_publish.sh --mode <mode>
--show-name <show>, which resolves the channel from the box env by mode
after loading the box secrets. A podcast_id carried on the intake payload
is never used for routing.
Provisioning (provision-podcast-client.sh, STEP 5.5 two-show channel
capture) records both channel ids in the provision ledger and prints the
box-side env contract for the operator to apply; it never invents a channel
id, and SOP-PODCAST-02 Section 2.5 remains the onboarding gate (capture
both ids, one roster row per show, both env vars SET, one standing-check
probe per show).
Why this resolves correctly against the roster gate: the good-standing
roster on the operator's n8n (podcast_publish_roster) holds ONE ROW PER
SHOW for a two-show client, both rows carrying the SAME identity tuple
(email plus last_name) and good_standing=YES, differing only by
podbean_channel_id. The n8n publish and standing gates match identity
first, then select the row whose podbean_channel_id equals the payload's
podcast_id (channel-preferred selection), falling back to the first matched
row only when no channel match exists (that fallback preserves the legacy
single-row client behavior exactly). Passing the mode-selected channel as
podcast_id is therefore exactly what makes a multi-row client resolve the
correct show row: a personal episode resolves the personal row, an
interview episode resolves the interview row, and a single-row client is
unaffected.
## Per-client credentials (labels and locations only, never values)
These are the NAMED CLIENT's OWN accounts (the ONE exception is the Podbean OAuth app, which is
BlackCEO's single shared app brokered via n8n - see the Podbean row); no operator, shared,
agency, or other-client credential ever substitutes for the per-client ones. Verification is
always SET or NOT SET plus a behavior probe; a value is never printed, echoed, grepped, or pasted.
- Fish Audio API key and voice reference_id: client env stores (live process env first) and the
Fish Audio skill config.
- Kie.ai API key: client env stores and the kie.ai skill config.
- Convert and Flow private integration token (prefix pit-) and Location ID: client env stores
via the shared alias resolver; the Location ID must equal the webhook payload's location_id.
- Podbean: the ONLY per-client Podbean value is the Podbean Channel ID (podcast_id) - the
client's show under BlackCEO's host account, captured at onboarding, never a secret, never
guessed by the mapper. The Podbean OAuth app client_id and client_secret are BlackCEO's SINGLE
shared app, NOT the client's, and no client box ever needs them. Publish-proxy mode (fleet
default): the client box's role is to TRIGGER the operator's n8n publish webhook - it is
provisioned with five variables for that trigger call only, never as credentials it owns:
PODBEAN_PUBLISH_WEBHOOK_URL (the operator's n8n publish webhook, not a secret) + PODBEAN_PUBLISH_TOKEN
(an operator-owned header token that authorizes the trigger call, placed by the operator,
NOT a Podbean credential) + PODBEAN_PODCAST_ID (the Channel ID above) + PODCAST_CLIENT_LAST_NAME
+ PODCAST_CLIENT_EMAIL (the roster identity tuple), plus optional PODCAST_CLIENT_FIRST_NAME for
display only. n8n performs the entire publish server-side (good-standing plus identity gate,
channel-scoped token mint, upload, create-episode) and returns the permalink synchronously; no
Podbean call and no OAuth mint ever happens on the client box. The n8n Podbean credential broker
(config/n8n/podbean-broker.workflow.json), which mints a Channel-scoped token for a client-box
local publish, is an unused fallback, not deployed on the live fleet n8n instance. Local
client_credentials (PODBEAN_CLIENT_ID + PODBEAN_CLIENT_SECRET, the BlackCEO shared app secret)
is the operator's OWN box only, last resort. Selection is per box: proxy if
PODBEAN_PUBLISH_WEBHOOK_URL and PODBEAN_PUBLISH_TOKEN both resolve, else broker if
PODBEAN_BROKER_WEBHOOK_URL and PODBEAN_BROKER_TOKEN both resolve, else local.
Ownership, stated plainly: the client box's ONLY role in publish-proxy mode
is to TRIGGER the operator's n8n webhook - the operator's n8n performs the
ENTIRE publish (good-standing/identity gate, token mint, upload, create-episode,
permalink). PODBEAN_PUBLISH_TOKEN is an operator-owned value that the operator
places onto the client box during provisioning, sourced from
OPENCLAW_PODBEAN_PUBLISH_TOKEN in the operator's own env at install time; the
client is never asked for it, never shown it, and it must never be handed off
through a person, a chat message, or a client's own agent. It is NOT a Podbean
credential and it is never the client's password - it is the header gate on
the operator's own n8n webhook (X-Podcast-Publish-Token); the actual Podbean
OAuth app client_id/client_secret is the separate thing named above, vaulted
only inside the operator's n8n and never placed on any client box. Conflating
the two is the exact trap: the client's only Podbean value, ever, stays the
Channel ID above (per the two-show model above, a client box carries one such
channel id per show: PODBEAN_PODCAST_ID for the default show plus one
PODBEAN_PODCAST_ID_<SHOW_SLUG> variable per additional show, for example
PODBEAN_PODCAST_ID_SOFT_GIRL_ERA; channel ids are never secrets). Both-or-neither
still holds for the pair (a lone URL or a
lone token is refused, never half-seeded). A client box that cannot be reached
to provision this pair is a tunnel or connectivity problem to fix - never a
reason to hand the token to a human as a workaround.
- Ollama Cloud API key or OpenRouter API key: client env (the ollama-cloud provider needs a
baseUrl, not an apiKey slotting).
- PODCAST_INTAKE_HOOK_SECRET and PODCAST_DASHBOARD_TOKEN: generated at provisioning, stored in
the client env or a 0600 secrets file.
- CLOUDFLARE_API_TOKEN is BlackCEO's OWN, operator side only, never on a client box; never trust
CLOUDFLARE_ZONE_ID.
## Enforcement pointers (a rule without a gate is a suggestion)
| Rule | Enforced by |
|---|---|
| State transitions, one writer, redaction | scripts/podcast_state.py |
| Cost ceilings and token budgets | scripts/podcast-cost-ledger.py |
| 16 Tier 1 deterministic checks | scripts/qc-tier1-mechanical.py |
| Attempt counter, frozen research, 3-strike | scripts/qc-attempt-gate.py |
| Credential resolution, pairing, fingerprint | scripts/ghl_credential_gate.py |
| Mode-to-channel selection (two-show convention), publish passes mode-selected channel as podcast_id | scripts/podcast_channel.py |
| Step 14 to Step 15 GHL handoff | scripts/podbean_publish.sh proxy-mode URL-match guard |
| No Anthropic in shipped runtime | scripts/guard-no-anthropic-runtime.py |
| Exactly one cron, no heartbeat, churn sweep | scripts/guard-cron-inventory.py |
| Alert dedup and storm cap, gateway-only | scripts/alert-dedup.py |
| Daily funded-reachability smoke test | scripts/podcast-smoke-test.py |
| Facebook-ads activation checklist item never drifts out of the client-onboarding runbook (SOP-PODCAST-02 Section 2.9) | scripts/guard-runbook-fb-activation-checklist.py |
| Activation layer (hook registration, the deterministic webhook/intake_handler.py first step, department installer) present in the build and healthy on a provisioned box; no-daemon contract upheld (route binding shape, agent materialization, intake env secrets, no poller cron); missing or broken activation fails loud | scripts/guard-activation-health.py (wired into qc-podcast.sh, act-6) |
If the repo is not updated, it is not done. A sub-agent's claim of done is a hypothesis until
independently verified.
## n8n workflow deployment (manual; fleet action)
The n8n workflow files in `config/n8n/` are **NOT auto-deployed** to the n8n host. A merge or
commit that changes a workflow JSON file on disk does NOT update the running workflow on the
n8n instance. The repo holds the source of truth; the running instance must be manually
reconciled. This is a known deployment gap, not a temporary condition: the n8n management API
key on this fleet has historically failed to authenticate for writes (`AUTHENTICATION_ERROR`),
so automated import via the n8n API is not available.
**Every n8n workflow change in this repository is a fleet action requiring manual redeployment by
the operator.** The process for each affected workflow:
1. Open the n8n instance (production URL: `https://main.blackceoautomations.com`).
2. Navigate to **Workflows** and locate the workflow by name (match against the README in
`config/n8n/`).
3. If the workflow already exists on the instance: deactivate it, export a backup, then delete
it from the instance.
4. **Workflows → Import from File** → select the updated `.workflow.json` file from
`58-podcast-production-engine/config/n8n/`.
5. Re-attach any named credentials (credential references in the JSON use placeholder IDs that
must be re-mapped to the instance's actual credentials after import).
6. Verify the webhook paths and environment variables per the instructions in
`config/n8n/README.md`.
7. Activate the workflow.
**Workflows subject to this manual deployment process:**
| Workflow file | Live workflow name | Purpose |
|---|---|---|
| `podbean-broker.workflow.json` | Podbean Broker | Mints Channel-scoped Podbean access tokens for client boxes |
| `podbean-publish.workflow.json` | create podcast episode from openclaw | Sanitized read-only reference export of the live full-publish workflow (not imported; audit reference only) |
Detailed per-workflow import instructions, credential setup, and contract documentation live in
`58-podcast-production-engine/config/n8n/README.md`. That README is the authoritative source for
credential mapping and environment variable requirements; this section documents the existence
and scope of the deployment gap.
**A build agent that modifies any file under `config/n8n/` MUST note in its commit message which
workflows the operator must re-import.** A merge that changes a workflow JSON without a
corresponding manual re-import leaves the running instance out of sync with the repository;
the workflow on disk is the source of truth, and the fleet is correct only when the instance
matches.
Files in this skill
- CHANGELOG.md
- INSTALL.md
- PODCAST-SNAPSHOT-BUILD-MANIFEST.md
- SKILL.md
- command-center/WIRING.md
- command-center/src/app/api/podcast/jobs/[job_id]/route.ts
- command-center/src/app/api/podcast/jobs/route.ts
- command-center/src/app/api/podcast/ops/tokens/[tokenId]/route.ts
- command-center/src/app/api/podcast/ops/tokens/route.ts
- command-center/src/app/api/podcast/queue/route.ts
- command-center/src/app/api/podcast/session/route.ts
- command-center/src/app/api/podcast/summary/route.ts
- command-center/src/app/podcast/episodes/[job_id]/page.tsx
- command-center/src/app/podcast/layout.tsx
- command-center/src/app/podcast/ops/access/page.tsx
- command-center/src/app/podcast/ops/layout.tsx
- command-center/src/app/podcast/ops/page.tsx
- command-center/src/app/podcast/ops/queue/page.tsx
- command-center/src/app/podcast/page.tsx
- command-center/src/app/podcast/queue/page.tsx
Attribution
Related skills
View all in business →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.