description: Operate and extend the Video Library Manager (`vlm`) with a safety-first, human-in-the-loop workflow across scan, parse, enrich, analyze, plan, review-plan, execute, rollback, and developer verification. Use when requests involve organizing a video library, producing or reviewing `inventory.csv`/`identities.json`/`analysis.json`/`plan.json`, tuning VLM config templates, resolving duplicates or episode gaps, running dry-run/confirm execution, recovering changes via rollback, explaining VLM CLI usage, or developing/modifying VLM features (parser, providers, planner, executor, commands, tests).
---
# VLM Library Workflow
## Overview
Run the repository's built-in media organization pipeline with consistent safety checks and explicit output verification. Prefer incremental, reviewable steps and never skip dry-run and plan inspection before destructive operations.
## Workflow Order
Run commands in this default sequence unless the user asks for a specific stage:
1.`vlm config init` then set `library_root` in `~/.vlm/config.yaml`
2.`vlm scan` to produce `inventory.csv`
3.`vlm parse --inventory inventory.csv` to produce metadata-rich `identities.json`
4.`vlm enrich` when bilingual titles and reputation signals are needed
5.`vlm analyze --inventory inventory.csv` to produce `analysis.json`
6.`vlm plan --analysis analysis.json` to produce `plan.json`
7.`vlm execute` (dry-run) and inspect summary
8.`vlm execute --confirm` only after explicit user confirmation
9.`vlm rollback` if the user requests revert
## Preflight Checks
Run these checks before executing workflow commands:
1. Confirm current working directory is repository root.
2. Probe command availability in this order:
1.`vlm --help`
2. if unavailable, switch all commands to `uv run vlm --help`
3. Run the target subcommand `--help` when options are uncertain.
4. Confirm config validity with `vlm config validate` after config edits.
5. Verify required input files exist before downstream stages.
6. Treat `execute --confirm` as destructive and require explicit user confirmation.