| name | vlog-round-launch |
| description | Launch the recurring vlog-pipeline two-lane cycle where yesterday's remaining or latest completed script is pushed into VPS video generation and one new script is started. Use when the user asks to open a new round, start yesterday's script as video plus a new script, continue the one-video-plus-one-script cadence, or check and advance the backlog without mixing scriptgen completion with video completion. |
Vlog Round Launch
Overview
Use repo MCP tools first. Treat the round as two separate lanes:
- Identify yesterday's remaining or latest completed script, stage its manifest into
/app/data/mirofish/uploads, and start video generation.
- Start one fresh
scriptgen pipeline for the next topic from the existing story pool.
Keep the two lanes separate in the summary. "Scriptgen completed" is not the same as "video started" or "video finished".
Workflow
1. Confirm the system is ready
- Check
mcp__vlog__.vlog_status to ensure video generation is idle before starting a new run.
- Resolve relative dates into exact dates in the user's timezone before concluding anything.
- Inspect
/app/data/scriptgen/<series_id>/ or dated file timestamps when the user refers to "yesterday's new script" or "yesterday's remaining script".
- Prefer MCP tools over ad hoc shell guesses.
Validation:
vlog_status is running=false, or the user explicitly wants only a status check.
- The answer states the exact date being advanced.
2. Identify yesterday's remaining script to move into video
- If the user names a
series_id, use that exact series after checking manifest.json exists.
- Otherwise, find the most recent completed
scriptgen manifest for the target date under /app/data/scriptgen/*/manifest.json.
- Prefer the script that is newer than the last completed video run and not already the current
run_state.manifest.
- Read the target
manifest.json and verify the series name and first episode id before staging it.
- If the manifest is only inside
scriptgen, copy it into /app/data/mirofish/uploads/manifest_<slug>.json.
- Start video with
mcp__vlog__.vlog_run when that tool is exposed.
- If
vlog_run is not exposed in the current session, fall back to mcp__vlog__.vlog_ssh and run the same repo-supported launch path:
- verify the staged manifest exists under
/app/data/mirofish/uploads
- start
python -m mirofish.driver /app/data/mirofish/uploads/<manifest> in the container background
- write logs to
/app/data/mirofish/run_<prefix>.log
Validation:
- The copied file exists under
/app/data/mirofish/uploads.
- The launch command returns started or the log file begins receiving output.
vlog_status shows running=true and the expected series, or the new run log confirms the driver is alive.
3. Start the next scriptgen topic
- Search the existing local story pool under
app/stories/, usually continuing the same era or topic cluster as the previous day.
- Reuse the repo's dashboard API shape:
POST /api/scriptgen/run_pipeline/{series_id}
form fields: topic, era, characters, episodes
- Use
mcp__vlog__.vlog_ssh against http://127.0.0.1:9999 on the VPS host when no direct MCP wrapper exists.
Validation:
- The API returns
{"ok":true,...}.
/app/data/scriptgen/<series_id>/pipeline.log shows Pipeline started.
- The log advances into
Outline or later.
4. Monitor both lanes
- Use
vlog_status or run_state for video progress.
- Use
/app/data/mirofish/run_<prefix>.log or pipeline.log for direct evidence when high-level history looks stale.
- Use
/app/data/scriptgen/<series_id>/pipeline.log for scriptgen progress.
- Normal retries/timeouts in scriptgen are not automatically fatal; only call it failed if the process exits or the log stops with an error.
5. Clean only safe local download caches
- Clean only local
distribute caches under the configured VLOG_UPLOAD_BASE_DIR, such as:
episodes_* directories
episodes_*.tar.gz
- Do not delete:
- any
pending/ upload queues
- the current
_downloaded_manifests/<prefix>.json if upload batching still needs it
- VPS-side manifests, scriptgen outputs, or generated videos
Validation:
- Report exactly what was deleted and what was intentionally kept.
Defaults
- Default to
characters=10 and episodes=20 unless the repo is clearly using a different pattern for that lane.
- If the previous day created a new script in the same era cluster, prefer the next topic from the same story file before jumping eras.
- If more than one completed script is waiting for video, choose the oldest unadvanced completed script first unless the user explicitly wants the latest.
- Use explicit dates in summaries, not only "today" or "yesterday".