Open-source AI podcast clipper. Generate vertical clips with face tracking and burned-in captions. CLI, MCP server, web app.
Python ai-toolsauto-captionscaptionscliffmpegmcpmcp-serveropusclip-alternativepodcast-clipspodcastsshortform-videovertical-videowhisper
feat: add /auto slash command — one-verb pipeline with strategy gate
Nika Siradze7a1557b3f8ef
diff --git a/.claude/commands/auto.md b/.claude/commands/auto.mdnew file mode 100644index 0000000..63d25ad--- /dev/null+++ b/.claude/commands/auto.md@@ -0,0 +1,129 @@+---+description: One-verb pipeline — drop a video, confirm strategy, render clips+allowed-tools: Read, Bash, mcp__podcli__transcribe_podcast, mcp__podcli__get_ui_state, mcp__podcli__set_video, mcp__podcli__suggest_clips, mcp__podcli__batch_create_clips, mcp__podcli__knowledge_base, mcp__podcli__clip_history+argument-hint: [video-path-or-episode-slug] [optional: count e.g. "5 clips"]+triggers:+ - auto+ - make shorts from this+ - just edit this+ - one-shot this+---++# /auto — One-Verb Pipeline++> Drop raw footage, confirm a strategy, get rendered clips back. Inspired by video-use: "LLM reads, doesn't watch."++This command orchestrates the existing MCP tools on top of the compact packed transcript. No menus. No preset selection. Strategy gate before any render.++---++## Rules++1. **Read, don't watch.** Reason about clips from the packed markdown view — not raw segments, not frame dumps.+2. **Strategy first, render after.** Propose the cut list and WAIT for user confirmation before calling `batch_create_clips`.+3. **Knowledge base is context, not template.** If `.podcli/knowledge/` exists, read it for brand voice and format preferences. If not, infer from the content itself.+4. **Never silently render.** Every clip that ships must appear in the proposal the user approved.++---++## Inputs++| Field | Required | Source |+|-------|----------|--------|+| Video path | Yes | First argument, or set via `set_video` |+| Clip count | Optional | Second argument, e.g. `"5 clips"`. Default: propose what the content supports (3–8). |+| Brief | Optional | Anything after the count, e.g. `"focus on the investor pitch moments"`. |++---++## Flow++### Phase 1 — Inventory++1. If a video path was given, call `set_video(file_path)` then `transcribe_podcast(file_path)`. If no path, read `get_ui_state` and use the current video.+2. Read the packed transcript: `get_ui_state(include_transcript: true)`. This returns a compact phrase-grouped view with speakers, silence gaps, and energy peaks.+3. If `.podcli/knowledge/` exists, read `01-brand-identity.md`, `02-voice-and-tone.md`, and `04-shorts-creation-guide.md` for show context. Skip silently if missing — `/auto` works on any content.+4. Call `clip_history` to see what's already been shipped for this episode. Avoid duplicates in the proposal.++### Phase 2 — Strategy Proposal (GATE)++Emit a numbered strategy table. Do NOT render yet.++```+Proposed strategy for <video-label> (<duration>, <N> speakers):++Inferred format: <talking-head | interview | montage | tutorial | travel | other>+Inferred tone: <from voice fingerprint or knowledge/02>+Target count: <N> clips (from arg, or inferred from content density)++#1 [00:04:22-00:05:01] 39s S0 "<hook>"+ Why: <one line — the angle, the stakes, or the moment>+ Title: <suggested, ≤60 chars>+ Style: <hormozi | karaoke | subtle | branded>++#2 ...++Unused peaks / skipped moments:+- [00:18:45] — high energy but no standalone hook+- [00:34:10] — great quote, but needs 40s of setup++Confirm? (yes / redirect / change specific clips)+```++**Stop here. Wait for the user's response.** Do not call `batch_create_clips` on implicit approval — require an explicit "yes", "go", "ship it", or similar.++### Phase 3 — Render++Once the user confirms:++1. Call `batch_create_clips(clip_numbers=[1,2,...])` with the confirmed list.+2. Stream progress events back to the user as they arrive.+3. When done, print the output paths and a one-line-per-clip summary.++### Phase 4 — Persist++Write a compact session log to `.podcli/sessions/<episode-slug>.md` (create the dir if missing):++```markdown+# <episode-label> — <ISO date>++## Proposed+<the strategy table>++## Rendered+- #1 → .podcli/output/<file>.mp4+- #2 → ...++## Skipped / redirected+- <any user redirects>+```++This gives next week's session something to pick up from. Not required — skip silently on I/O failure.++---++## Error Handling++- **Three-strike rule**: if any phase fails 3 times in a row, STOP and report. Do not continue with partial state.+- **No transcription yet**: call `transcribe_podcast`. It runs Whisper + diarization + auto-packs — takes minutes on a 60-min episode.+- **No packed view available**: `get_ui_state` falls back to raw segments automatically. Proceed, but flag lower reasoning quality in the proposal.+- **User says "redirect"**: discard the current proposal, ask what to change, re-propose. Don't argue.++---++## What `/auto` Is NOT++- Not a content-package generator — use `/produce-shorts` for titles/descriptions/thumbnails across the whole pipeline.+- Not a self-eval loop yet — `timeline_view` (the visual composite that would verify cut boundaries on rendered output) is not built. For now, trust the cut planner and inspect output manually.+- Not autonomous — the strategy gate is mandatory. No clips ship without explicit user confirmation.++---++## Completion++Return one of:++- **DONE** — Strategy approved, all N clips rendered, session log written.+- **PARTIAL** — Some clips rendered, some failed. Report which succeeded and the failure reason for the rest.+- **CANCELLED** — User redirected or rejected the strategy. No clips rendered.+- **BLOCKED** — Upstream failure (transcription, no audio, corrupt source). Report the specific ask needed to unblock.diff --git a/backend/cli.py b/backend/cli.pyindex bed562e..746e8ed 100644--- a/backend/cli.py+++ b/backend/cli.py@@ -2475,6 +2475,7 @@ def print_help():print(f" {dim}${reset} podcli thumbnails \"Why AI Changes Everything\" --video ep42.mp4")print()print(f" {bold}PodStack{reset} {dim}(Claude Code slash commands):{reset}")+ print(f" {accent}/auto{reset} One-verb pipeline: confirm strategy → render clips")print(f" {accent}/prep-episode{reset} Full pipeline: transcript → publish-ready")print(f" {accent}/process-transcript{reset} Extract clip-worthy moments from transcript")print(f" {accent}/generate-titles{reset} Generate 8 title options with verification")diff --git a/podcli b/podcliindex 30ad7e9..c45a41c 100755--- a/podcli+++ b/podcli@@ -23,7 +23,7 @@ CMD="$1"CMD_CLEAN="${CMD#/}"CMD_CLEAN="${CMD_CLEAN#--}"-PODSTACK_COMMANDS="prep-episode process-transcript generate-titles generate-descriptions plan-thumbnails review-content publish-checklist retro-episode plan-episode produce-shorts"+PODSTACK_COMMANDS="auto prep-episode process-transcript generate-titles generate-descriptions plan-thumbnails review-content publish-checklist retro-episode plan-episode produce-shorts"for pc in $PODSTACK_COMMANDS; doif [ "$CMD_CLEAN" = "$pc" ]; then