# AutoShorts Dashboard Roadmap

## Sprint 7 — CSV Recovery, Website Bridge & Foundations
- correct Google Drive CSV folder: `TrueTraceShorts/Analysen/260606 Youtube/`
- finalize mapping actions: Link to package, Link to family only, Ignore
- add website companion workflow controlled by the Dashboard
- improve Accounts/Logs/Verification/Settings foundations

Status Sprint 7:
- Website Bridge MVP works locally: payload prepare, generate, website QA, and commit-ready diff/status.
- No website push is performed by default.
- The initial strict exact-filename CSV guard was too fragile and was superseded by Sprint 7.1.

## Sprint 7.1 — CSV Canonicalization & Real Analytics Import
- ID-named Drive CSVs are detected by content/header, not filename.
- `scripts/canonicalize_youtube_csvs.py` copies recognized CSVs to canonical names while preserving raw files.
- Real local YouTube 260606 analytics imported from recognized `Tabellendaten`.
- Import no longer blocks on optional/header-only `Diagrammdaten`.
- `Gesamtwerte` is recommended but optional; missing daily totals produce a warning instead of hiding video results.
- Analytics Import UI shows CSV recovery status: recognized files, canonical names, missing optional files and warnings.

Status Sprint 7.1:
- `260606_Tabellendaten.csv` canonicalized from `19gjWRSocGaZerFRsDKPbH1ngrTQKO2i8.csv`.
- `260606_Gesamtwerte.csv` missing/optional.
- `260606_Diagrammdaten.csv` missing/optional.
- Import batch `272de855-c1b7-435f-97b3-ae2c2e73da31` created from `Youtube 260606`.
- Real analytics now show 41 videos, 436 total views, 0 linked, 41 unlinked.

## Sprint 7.2 — Link Real Analytics to Content & Website
- link imported YouTube analytics rows to Content Scripts, Content Families, Prepared Packages and Website Guides
- improve mapping confidence and bulk mapping
- connect Website candidate data and upload audits
- prepare Website push decision flow

Status Sprint 7.2:
- Source index scans Website candidates, Red Flag markdown, YouTube upload audits, and review packages.
- High-confidence auto-link preview found 18 unique YouTube-ID matches.
- Bulk auto-link linked 18 videos and left 23 unlinked for manual review.
- Content Library family cards now expose real views, videos with analytics, retention, subscribers, best video, website guide counts.
- Analytics Results rows now show Family/Script/Package/Website status and suggested matches.
- Website pending card shows 3 pending files, QA/commit-ready status, and waits for explicit approval. No website push occurred.

## Sprint 8 — YouTube Private Upload MVP
- Google OAuth / YouTube account connection
- upload prepared videos as private
- save YouTube video ID
- create upload audit
- connect uploaded video to Analytics, Website Companion, Content Script and Package
- no public publishing
- no automatic website push

Status Sprint 8:
- OAuth start/callback/status/disconnect/reconnect endpoints implemented with youtube.upload-only scope and state validation.
- Tokens are encrypted server-side and redacted from account/API/log responses.
- Private upload endpoint creates a PublishJob and YouTubeUploadAudit; Sprint 8 rejects public/unlisted uploads and missing confirmations.
- Dry-run mode produces `dryrun_<uuid>` IDs without calling YouTube and exercises audit/context updates.
- Successful dry-run updated PostDraft.external_post_id, VideoAsset.external_youtube_id, ExternalPost, ActivityEvent and WebsiteCompanion status `waiting_for_public_video`.
- Accounts, Review, Settings and Logs UI show YouTube upload configuration/readiness/audit state.
- Website update remains pending and unpushed.

## Sprint 8.1 — Existing Upload Reconciliation, Uploader Bridge & Production Queue
- reconcile existing Jarvis/YouTube uploads before any new upload attempt
- import existing YouTube audit JSONs into Dashboard audit/context models
- represent the existing Jarvis uploader as an UploadExecutor
- create UploadRequest approval/outbox flow for the existing uploader
- expose agent polling APIs for upload requests and production briefs
- add Production Queue and lockable next item for Jarvis production
- detect package_real_003 / MFA website guide duplicate without deleting or pushing files
- no TikTok, no real Dashboard OAuth test, no website push

Status Sprint 8.1:
- ERF-025/026/027 reconciled from existing Jarvis upload audits and website candidates/markdown.
- Imported YouTube IDs: J6ErKh55-KQ, VT669BkNdnw, egZgCZCGGhU.
- Website companions for the three existing videos are status `pushed` because matching website markdown exists.
- Existing uploader executor is active; Dashboard OAuth remains configured_required.
- UploadRequest outbox flow writes token-free JSON under storage/outbox/upload_requests.
- Production Queue contains locked next item: `If This Message Says Your Account Will Be Locked, Stop`.
- Agent production endpoint returns the locked item and expected manifest path.
- package_real_003 is flagged as potential duplicate of `mfa-prompt-without-login`; pending files remain untouched.

## Sprint 8.2 — End-to-End Production Loop
- make Production Queue the creator-controlled source of production order
- expand queue items with script/visual/voice constraints and expected/actual package links
- finalize agent production APIs including ready-for-review state
- document Chat → Agent → Package → Dashboard contract
- create a low-cost test package generator for mechanical E2E validation
- import queue-linked prepared packages and surface queue origin in Review
- test UploadRequest status transitions using existing Jarvis uploader without a real upload
- no TikTok, no website push, no final Wan render, no real upload without explicit approval

Status Sprint 8.2:
- Test package `package_774e1ed1` generated from locked queue item.
- Test VideoAsset `900c887c-f76c-40ef-a491-a402133f654e` imported and linked to ProductionQueueItem `774e1ed1-6500-4b9a-bea2-453708902e65`.
- Queue item reached `in_review` after attach/import/ready-for-review.
- UploadRequest `0faaf66c-9596-41a7-a95f-b31abe6e5a8f` exercised `approved -> sent_to_executor -> completed` without YouTube ID and without real upload.
- Outbox JSON created at `storage/outbox/upload_requests/0faaf66c-9596-41a7-a95f-b31abe6e5a8f.json` and verified token-free.
- Website status unchanged: no push, duplicate pending guide remains waiting for approval.

## Sprint 8.3 — Verification-Ready TikTok Demo Flow
- create a recordable TikTok Developer verification demo flow
- keep scope narrow: `video.upload` only
- demonstrate Upload Draft (`/v2/post/publish/inbox/video/init/`) using `FILE_UPLOAD`
- add Mock Demo Mode for internal rehearsal without external TikTok API calls
- keep Sandbox Mode honest: configured only when credentials/account exist
- keep Real Direct Post disabled
- add TikTokUploadAttempt, TikTok Verification logs, readiness score and demo script
- document dashboard staging-domain plan for TikTok app review
- no TikTok real post, no YouTube upload, no website push, no final Wan render

Status Sprint 8.3:
- `/verification` and `/settings/verification` show readiness, mode, requested scope, upload method, current test video, blocking issues and recording path.
- Review page shows TikTok Upload Draft card with video preview, caption/hashtags, AIGC/commercial disclosures, consent checkbox and `Create TikTok draft`.
- Logs page has `TikTok Verification` filter with redacted request/response.
- Mock attempt created from `package_774e1ed1`: `bc8e9697-df3c-421a-9b4b-f442df7516df`, publish id `mock_publish_7b61b68d6631`, status `mock_uploaded_to_draft`.
- Verification readiness: internal rehearsal ready = yes; TikTok submission video ready = no because sandbox credentials/account are not configured.
- Docs added: `docs/tiktok-verification-demo-script.md`, `docs/tiktok-verification-domain-plan.md`.
- Tests: `57 passed, 3 warnings`; Ruff all checks passed; frontend build success.
- No real TikTok/YouTube upload and no website push occurred.

## Sprint 8.4 — German UI/UX Clarity & Visual Polish
- translate main visible dashboard UI into German
- simplify `/dashboard` into next-step, open tasks, short analytics and recent videos
- turn `/videos` into the daily review workspace with collapsible filters
- improve `/videos/:id/review` decision logic: video, checklist, platform texts, TikTok verification and upload actions
- make `/production-queue` a user-facing `Produktionsplan` instead of technical JSON-first queue
- make `/analytics` understandable with German summary cards/table labels
- make `/verification` recording-friendly in German
- add central label helpers and a consistent 9:16 thumbnail component
- document UX audit in `docs/ux-audit-sprint-8-4.md`
- no platform feature expansion, no website push, no final render

Status Sprint 8.4:
- Main navigation is German: Übersicht, Videos, Upload, Kalender, Produktionsplan, Analyse, Content-Bibliothek, Protokolle, Verifizierung, Einstellungen.
- Required copy scan for old English main labels returns no matches.
- `npm run build` succeeded.
- Remaining QA results are in the Sprint 8.4 completion report.

## Sprint 8.5 — TikTok-Verifizierungs-Generalprobe
- create `/verification/recording?recording=1` as a focused recording route
- hide/minimize dashboard chrome in recording mode
- show only video, caption/hashtags, disclosure, consent, Upload Draft result and redacted logs
- keep Mock Mode honest: no external TikTok API call, no Sandbox claim, no Direct Post
- document first-attempt risk without public dashboard domain/Sandbox credentials
- create `docs/screenrecording-runbook.md`
- create/update `docs/tiktok-app-review-submission-draft.md` with conservative vs pragmatic variants
- no new domain, no Sandbox expansion, no real TikTok/YouTube upload, no website push, no final render

Status Sprint 8.5:
- Recording route added for internal rehearsal.
- Current decision: proceed with best-effort recording first using current preview; known review risk documented.
- Final QA results are in the Sprint 8.5 completion report.

## Sprint 8.6 — Clean TikTok Recording Page
- make `/verification/recording?recording=1` a clean recording stage, not a debug/compliance page
- show HTML5 9:16 video player with controls and poster
- select a real prepared package for recording, not the 5s test preview when better media exists
- provide editable Description and Hashtags fields
- save caption/hashtag edits before creating the draft
- show two creator actions only: AI-generated/synthetic media checkbox and creator approval checkbox
- show a short success card after draft creation
- remove visible YouTube/Website/Domain/Sandbox/Mock/risk/API endpoint/scope/source/publish_id/JSON/log details from recording page
- keep risk/Mock/redaction details in `/verification`, logs, and internal docs

Status Sprint 8.6:
- Current selected recording video: `This Small Fee Can Expose Your Card` (`package_real_001`, 23.75s, 14.2MB).
- Final QA results are in the Sprint 8.6 completion report.

## Sprint 8.7 — Production System Dashboard
- Pause automatic TikTok upload and TikTok mock-demo recording.
- Treat the Dashboard as the source-of-truth production system:
  `Content Library → Production Plan → Jarvis next item → Review → YouTube private upload/schedule → TikTok manual export → Analytics learning loop`.
- Keep `/production-queue` and `/api/agent/production/next` as the only authority for “produce the next Short”.
- Refocus `/videos/:id/review`:
  - TikTok: manual MP4 download, caption/hashtags copy, mark exported/posted.
  - YouTube: private upload now with real connected OAuth, schedule private upload, dry-run check, or approve UploadRequest for existing Jarvis uploader.
  - Website Companion: optional separate approval-gated flow only.
- Remove TikTok verification/mock from the primary navigation and dashboard decision cockpit.

Status Sprint 8.7:
- Production Plan now shows a real multi-item queue (10+ recommendations) with Move up/down, Lock, Unlock, Replace locked, Hold, Archive, Send to concept.
- Recommendation engine adds Duplicate Risk, Similar Content, Rotation Hint and Performance Reference; Account-Locked-like ideas are warned and not blindly selected.
- Chat/Agent flow is confirmation-gated: `/api/agent/production/next` returns `requires_concept_confirmation=true`; `/mark-started` requires `concept_approved`.
- Safe reset endpoint/script archives old active review/test workspace without deleting analytics/content library.
- Active Inbox default view is clean after reset.
- Existing Jarvis YouTube uploader is primary real private-upload executor (`ready`, credentials `available`, token-free outbox/agent handoff).
- Calendar has reschedule/cancel/upload now/retry actions and hides archived history.

## Sprint 8.8 — Review Rejection, Revision Flow & Creative Quality Gate
- add real Reject video workflow with required reason/categories, ReviewDecision, draft rejection and queue removal
- add Request changes workflow with RevisionRequest and `needs_changes` queue/video state
- make `/api/agent/production/next` return Dashboard-owned `quality_profile` and mandatory `director_skill`
- require `quality.overall = passed` for Dashboard ProductionQueue prepared packages to become `ready_for_review`
- show Quality Gate card on Review page and block upload/export/approval if quality failed/missing/rejected
- document `docs/director-production-skill.md` and link it from the agent contract
- no further production until quality-first workflow is active

Status Sprint 8.8:
- In progress in this sprint delivery. Final commit/test status is reported in the chat completion.

## Sprint 9 — First real package production and upload executor drill
- Polish TikTok manual export checklist and optional TikTok link capture.
- Finish Dashboard Google OAuth configuration/test-user flow for direct private YouTube upload.
- Add scheduled upload executor/worker or Jarvis polling handoff for scheduled private uploads.
- Add clearer upload-request status in Calendar and Dashboard.
- Keep TikTok API upload paused unless explicitly re-approved later.

## Sprint 10 — Production Hardening
- migrations
- auth/security
- deployment
- backup/recovery
- monitoring
- CI/QA
- structured error handling and restore drills
