# AutoShortsBot runtime cleanup and canonical path

Use this when the user asks which AutoShortsBot folder is current, which duplicate can be removed, or how to reclaim disk space without losing active TrueTraceShorts/Everyday Red Flags work.

## Current canonical project path

Prefer this as the long-term canonical AutoShortsBot clone:

```text
/home/agent/jarvis_runtime/autoshortsbot/AutoShortsBot
```

Why:

- It is the strategic/architecture branch used for TrueTraceShorts / Digital Red Flags work.
- It contains strategy-refactor-v2, upload-only YouTube tooling, approval/dry-run/execute CLI work, scoring/caption/image-policy changes, and YouTube audit artifacts.
- It is the better future base for repository work and feature development.

## Other runtime copy

This path may still contain newer production render scripts or generated artifacts and should not be deleted blindly:

```text
/home/agent/jarvis_runtime/AutoShortsBot
```

Common contents observed there:

- `scripts/render_erf001...` through later ERF render scripts.
- newer rendered/post-candidate outputs under `data/post_candidates/`.
- topic database updates such as `data/content_ideas/everyday_red_flags_topic_database.json`.
- monetization/audio-bed/generated render assets.

Treat it as an older/parallel working copy that may hold useful production artifacts. Before deleting it, migrate or archive any newer scripts/data not present in the canonical repo.

## Safe cleanup sequence

1. Inspect both repos before changing anything:

```bash
git -C /home/agent/jarvis_runtime/autoshortsbot/AutoShortsBot status --short --branch
git -C /home/agent/jarvis_runtime/AutoShortsBot status --short --branch
```

2. Compare high-value untracked or modified files, especially:

```text
scripts/render_erf*.py
autoshorts/**/*.py
tests/**/*.py
docs/**/*.md
data/content_ideas/everyday_red_flags_topic_database.json
data/monetization/
data/audio_beds/
data/youtube_upload_audits/
```

3. Keep generated media separate from source code. Candidate cleanup targets are usually generated artifacts, not source:

```text
data/previews/
data/final_exports/
data/post_candidates/
data/generated_backgrounds/
data/generated_clips/
data/comfyui_outputs/
.venv/
```

Delete generated artifacts only after confirming the videos/packages were uploaded, delivered, backed up, or no longer needed for hash-bound approvals.

4. If retiring the non-canonical copy, prefer rename-and-test over immediate deletion:

```bash
mv /home/agent/jarvis_runtime/AutoShortsBot /home/agent/jarvis_runtime/AutoShortsBot.OLD_REVIEW
```

Run normal AutoShorts/TrueTrace workflows from the canonical path for a few days. If nothing depends on the old path and all useful files were migrated, remove the `.OLD_REVIEW` directory.

## Legacy OpenClaw starter

A root-level script such as `/home/agent/Start_Shorts_Bot.sh` may point to:

```text
/home/agent/.openclaw/workspace/Auto_Shorts_Bot/
```

That is legacy OpenClaw-era wiring and not evidence that the current AutoShortsBot lives there. Treat `.openclaw` Auto Shorts paths as separate legacy cleanup candidates unless the user explicitly asks to keep OpenClaw workflows.

## Pitfalls

- Do not assume differently cased paths are duplicates; they may have diverged by branch and purpose.
- Do not delete the non-canonical copy before checking untracked render scripts and generated approval packages.
- Do not preserve gigabytes of old generated MP4s by default; source, tests, docs, approval metadata, and topic databases matter more than regenerated preview media.
- Do not put generated videos, OAuth tokens, `.env`, or local media caches into Git while consolidating.
