Relocate existing video files to correct folders based on DB metadata. Use when the user says "フォルダを移動したい", "整理したい", "サブタイトルがフォルダ名になってる", or wants to reorganize files already under B:\VideoLibrary or any library drive.
exec find "B:\VideoLibrary" -name "foo"video_pipeline_relocate_existing_files {"apply": false, "roots": ["B:\\VideoLibrary\\foo"]}video_pipeline_relocate_existing_files<program_title>/<year>/<month>/) are defined in drive_routes.yaml. Do not ask the user how to organize files.video_pipeline_relocate_existing_filesroots=["B:\\VideoLibrary"] (親ディレクトリ)B:\\VideoLibrary\\おぎやはぎの愛車遍歴 を指定すると、おぎやはぎの愛車遍歴▽... のような兄弟フォルダが範囲外になる。Execution rule: Steps 1→2→3 run consecutively without waiting for user confirmation. Only pause for user confirmation at step 4 (before apply). Do not output text and stop mid-flow — always continue to the next tool call.
Validate
video_pipeline_validate {"checkWindowsInterop": true, "intent": "relocate"}
Stop and report if ok=false. If ok=true, follow the nextStep field in the result and proceed to step 2.
Dry-run (required)
video_pipeline_relocate_existing_files {
"apply": false,
"roots": ["B:\\VideoLibrary"],
"queueMissingMetadata": true,
"writeMetadataQueueOnDryRun": true,
"scanErrorPolicy": "warn",
"scanRetryCount": 2
}
Branch on dry-run result
| State | Next action |
|---|---|
plannedMoves > 0 and requiresMetadataPreparation=false | → Step 4 (user confirmation) |
requiresMetadataPreparation=true or metadataQueuePlannedCount > 0 | → Run /extract-review to fill metadata, then restart from step 2 |
suspiciousProgramTitleSkipped > 0 | → Follow followUpToolCalls — ツールが video_pipeline_detect_folder_contamination を提案する。folder-cleanup でタイトル修正後、step 2 再実行 |
unregisteredSkipped > 0 | → Apply to auto-register, then fill metadata and re-run |
plannedMoves == 0 and alreadyCorrect > 0 and suspiciousProgramTitleSkipped == 0 | → Report all files already in correct location |
plannedMoves == 0 and alreadyCorrect not reported | → State explicitly: cannot confirm correct placement; report reason |
outcomeType / nextActions / diagnostics from the tool result when present.suspiciousProgramTitleSkipped > 0 はサブタイトル汚染 (▽/▼がprogram_titleに混入)。already_correct ではない。
| User says title is wrong / folder name ≠ program name | → Use video_pipeline_update_program_titles to fix title first (dryRun=true then apply), then restart from step 2 |Show dry-run plan to user and get confirmation
Apply
video_pipeline_relocate_existing_files {
"apply": true,
"planPath": "<plan_path from dry-run result>"
}
planPath is required. Obtain from dry-run result. Never apply without planPath.Completion report
autoRegisteredPaths > 0, show the autoRegisteredFiles list to the user.plannedMoves count and destination paths from dry-run/extract-review was completed firstplanPath was taken from dry-run result and passed to applyexitCode == 0 / movedCount verifiedIf requiresMetadataPreparation=true is returned:
metadataQueuePath from dry-run result) as queuePath to the /extract-review skill.human_reviewed_metadata written), restart this skill from step 2.