pasha

byletsmoj moj

This is "youtube-automation-agent" — you're turning it into "PaashaClips Studio": a zero-API-key, fully local YouTube content pipeline that also auto-generates Shorts from every video it produces. Everything must run free, offline, on this machine — no paid API keys anywhere in the core pipeline. The only exception is YouTube publishing itself, which needs one free Google Cloud OAuth client — and that must stay a clearly optional, skippable final step, not a requirement to use the app. START HERE - Run /init if you haven't already, so you have a map of this codebase. - Read index.js, the agents/ folder, database/db.js, utils/credential-manager.js, and utils/ffmpeg.js before making changes — confirm my description of the existing architecture below matches what's actually there, and tell me if it doesn't before proceeding. - Existing architecture (verify this): 7 agents (ContentStrategyAgent, ScriptWriterAgent, ThumbnailDesignerAgent, SEOOptimizerAgent, ProductionManagementAgent, PublishingSchedulingAgent, AnalyticsOptimizationAgent), a Database class (sqlite3), CredentialManager, an Express dashboard on port 3456, a DailyAutomation scheduler, and duplicate OAuth flows in modern-auth.js and oauth-server.js. Work through the phases below in order. After each phase: run `npm test` and `npm run lint`, show me a summary of what changed, and wait for me to say "continue" before starting the next phase. Don't break the existing 12 system tests or the simulation-fallback behavior (pipeline must still run with zero dependencies installed, for testing purposes). ═══════════════════════════════════════ PHASE 1 — FIX EXISTING WEAK SPOTS ═══════════════════════════════════════ 1. Consolidate modern-auth.js and oauth-server.js into one OAuth module — keep modern-auth.js's auto-browser-open UX, remove the duplicate flow. Update package.json scripts and README references. 2. Add a loud startup warning (not just logger.warn) if NODE_ENV=production and API_KEY is unset. 3. If FFmpeg isn't found at startup, refuse to start the scheduler entirely (fail loud, not silent — currently it only warns). ═══════════════════════════════════════ PHASE 2 — SWAP TO A FULLY LOCAL, FREE AI STACK ═══════════════════════════════════════ 4. Replace cloud LLM calls in ContentStrategyAgent and ScriptWriterAgent with calls to a local Ollama instance (http://localhost:11434) — e.g. llama3.1:8b, configurable via .env (OLLAMA_MODEL). No API key. 5. Replace ThumbnailDesignerAgent's AI image generation with a templated thumbnail: background + title text overlay using Sharp (already a dependency). Zero external calls. 6. Replace the TTS step in ProductionManagementAgent with a local Piper TTS call instead of any cloud TTS provider. 7. Add startup capability checks for Ollama/Piper (is the service running / binary installed?) in the same style as utils/ffmpeg.js's checkFFmpeg() — clear plain- English install instructions if missing, never a silent crash. 8. Update the capability-check summary in index.js's logCapabilitySummary() to reflect the new local stack instead of the old OpenAI/Gemini/ElevenLabs/Azure checks. ═══════════════════════════════════════ PHASE 3 — SHORTS CLIPPING (NEW AGENT) ═══════════════════════════════════════ 9. Create agents/shorts-clipping-agent.js, following this repo's existing agent pattern (constructor takes db + credentials, has initialize()). After ProductionManagementAgent finishes the long-form .mp4: - Transcribe it locally with faster-whisper (spawn as a Python subprocess, or find a suitable Node binding — your call based on what's cleanest given the existing codebase). - Ask the local Ollama model to pick the 2-3 highest-hook-potential segments. - Cut those segments with FFmpeg into 9:16 vertical clips. - Burn in word-by-word captions using the word-level timestamps faster-whisper provides. 10. Add a `shorts` table to database/db.js: contentId (FK), path, title, durationSec, status (pending_review/approved/rejected). Extend saveProductionData to insert rows. 11. Wire the new agent into index.js's generateContent(), between the production step and the DB-save step. 12. Feature-flag with ENABLE_SHORTS_CLIPPING=true in .env — pipeline must still run correctly with it off, or with faster-whisper not installed (graceful degradation, matching the FFmpeg-check pattern). ═══════════════════════════════════════ PHASE 4 — SIMPLE APPROVAL STEP ═══════════════════════════════════════ 13. Add status: 'pending_review' after production/shorts-clipping completes, before scheduleContent() runs. Nothing publishes without explicit approval — this is a single dashboard action, not a multi-status workflow: just Approve or Reject. 14. Add a minimal dashboard section showing the generated video + thumbnail + shorts with one Approve / Reject button each. Keep this simple — no separate queue page, no elaborate states. ═══════════════════════════════════════ PHASE 5 — ONE-CLICK RUN + OPTIONAL YOUTUBE CONNECTION ═══════════════════════════════════════ 15. Add a single "Generate Video Now" button on the main dashboard that triggers /generate and shows live progress through each stage (strategy → script → thumbnail → TTS → video → shorts). No automation scheduler, no multi-channel support — keep this to one channel, one manual trigger button for now. 16. Make YouTube connection a clearly separate, optional dashboard section: "Connect YouTube (optional)." Without connecting, approved videos just stay in data/videos/, ready for manual upload — the app must be fully useful without ever touching Google's API. ═══════════════════════════════════════ PHASE 6 — REBRAND TO "PaashaClips Studio" ═══════════════════════════════════════ 17. Update package.json name/description, README title, dashboard <title>/header text, and the console startup banner in index.js. 18. Replace the hardcoded "Ethereal Dreamscript" strings in the OAuth success page (both the HTML shown in-browser and the console.log messages) with "PaashaClips Studio." 19. Grep the codebase for any other leftover old-name display strings and update them. Do NOT rename the npm package's internal "name" field or anything referenced programmatically elsewhere — only change user-facing display text. ═══════════════════════════════════════ PHASE 7 — SETUP UX ═══════════════════════════════════════ 20. Update setup.js/walkthrough.js to check for Ollama, Piper, faster-whisper, and FFmpeg — matching the existing FFmpeg-check tone — and give install instructions for whichever are missing. No API key prompts unless the user chooses to also connect YouTube. 21. Update CONTRIBUTING.md/README to describe the new zero-key local stack and how to test the full pipeline end-to-end without any accounts. CONSTRAINTS THROUGHOUT - Nothing in the core pipeline may require an API key, credit card, or paid tier. - The only credential anywhere in the app is the optional YouTube OAuth client. - One concern per commit — commit after each phase with a clear message, don't batch everything into one giant commit. - Add a regression test in test.js for each new piece of behavior, following the existing SystemTest pattern. - Don't touch package-lock.json unless a dependency actually changes.

LandingLoginDashboard
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks

208 planning tasks
#1

Generate system requirement document

3m 54s0.1 cr used
Done
#42

Generate system requirement document

1433m 45s0.1 cr used
Cancelled
#45

Retry Requirements

1433m 45s0.2 cr used
Cancelled
#50

Generate system requirement document

0.1 cr used
Error
#53

Retry Requirements

0.2 cr used
Cancelled
#96

Generate system requirement document

1667m 23s0.1 cr used
Cancelled
#160

Generate system requirement document

1158m 18s0.1 cr used
Cancelled
#168

Generate system requirement document

0.1 cr used
Error
#176

Retry Requirements

0.2 cr needed
Backlog
#172

Retry Requirements

0.2 cr used
Cancelled
#177

Generate system requirement document

0.1 cr needed
Backlog
#180

Retry Requirements

0.2 cr used
Queued
#204

Generate system requirement document

0m 16s0.1 cr used
Paused
#208

Retry Requirements

0.2 cr used
Queued
#207

Retry Requirements

0m 1s0.2 cr used
Cancelled
#214

Generate system requirement document

0.1 cr used
Error
#217

Generate system requirement document

0.1 cr used
Error
#221

Retry Requirements

0.2 cr used
Queued
#220

Retry Requirements

0.2 cr used
Cancelled
#222

Generate system requirement document

0.1 cr used
Error
#225

Generate system requirement document

0.1 cr used
Error
#228

Retry Requirements

0.2 cr used
Queued
#2

Generate personas & user flows

0m 7s0.1 cr used
Done
#7

Create flow for Solo Creator / Operator

0m 6sCredits in parent
Done
#8

Create flow for Setup / Installer

0m 6sCredits in parent
Done
#56

Generate personas & user flows

0m 9s0.1 cr needed
Done
#57

Create flow for Solo Creator / Operator

0m 8sCredits in parent
Done
#58

Create flow for Setup / Installer

0m 8sCredits in parent
Done
#161

Generate personas & user flows

0.1 cr used
Cancelled
#169

Generate personas & user flows

0.1 cr used
Error
#175

Generate personas & user flows

0m 11s0.1 cr needed
Done
#181

Create flow for Solo Creator / Operator

0m 8sCredits in parent
Done
#182

Create flow for Setup / Installer

0m 8sCredits in parent
Done
#9

Landing

6m 53sCredits in subtasks
Done
#19

Repair Landing JSX

1m 7s0.2 cr used
Done
#15

Landing / Navigation

0m 24s0.8 cr used
Done
#12

Landing / Filmstrip Hero

0m 46s0.8 cr used
Done
#13

Landing / Local Stack

0m 41s0.8 cr used
Done
#14

Landing / Local Handoff

0m 40s0.8 cr used
Done
#16

Landing / Footer

0m 16s0.8 cr used
Done
#17

Navigation

0m 24sCredits in parent
Done
#18

Footer

0m 16sCredits in parent
Done
#43

Design first page

0.1 cr used
Error
#51

Design first page

0.1 cr used
Error
#61

Landing

7m 11sCredits in subtasks
Error
#64

Landing / Navigation

0m 0s0.8 cr needed
Done
#65

Landing / Hero Console

0.8 cr used
Error
#66

Landing / Local Stack Overview

0.8 cr used
Error
#67

Landing / Local Outputs And Review

0.8 cr used
Error
#68

Landing / Footer

0m 0s0.8 cr needed
Done
#69

Retry First Page

0m 36s0.2 cr used
Error
#72

Landing

2m 16sCredits in subtasks
Error
#75

Landing / Navigation

0m 0s0.8 cr needed
Done
#76

Landing / Hero Console

0.8 cr used
Error
#77

Landing / Local Stack Overview

0.8 cr used
Error
#78

Landing / Local Outputs And Review

0.8 cr used
Error
#79

Landing / Footer

0m 0s0.8 cr needed
Done
#80

Retry First Page

0m 38s0.2 cr used
Error
#83

Landing

4m 25sCredits in subtasks
Done
#86

Landing / Navigation

Not recorded0.8 cr needed
Done
#87

Landing / Hero Console

0m 45s0.8 cr used
Done
#88

Landing / Local Stack Overview

0m 38s0.8 cr used
Done
#89

Landing / Local Outputs And Review

0m 40s0.8 cr used
Done
#90

Landing / Footer

Not recorded0.8 cr needed
Done
#91

Retry First Page

4m 17s0.2 cr used
Done
#103

Landing

2m 23sCredits in subtasks
Error
#106

Landing / Navigation

0m 0s0.8 cr needed
Done
#107

Landing / Hero Console

0.8 cr used
Cancelled
#108

Landing / Local Stack Overview

0.8 cr used
Cancelled
#109

Landing / Local Outputs And Review

0.8 cr used
Cancelled
#110

Landing / Footer

0m 0s0.8 cr needed
Done
#111

Retry First Page

0m 50s0.2 cr used
Error
#114

Landing

4m 47sCredits in subtasks
Error
#117

Landing / Navigation

0m 1s0.8 cr needed
Done
#118

Landing / Hero Console

0.8 cr used
Cancelled
#119

Landing / Local Stack Overview

0.8 cr used
Cancelled
#120

Landing / Local Outputs And Review

0.8 cr used
Cancelled
#121

Landing / Footer

0m 0s0.8 cr needed
Done
#122

Retry First Page

1m 2s0.2 cr used
Error
#123

Retry First Page

0m 48s0.2 cr used
Error
#126

Landing

2m 45sCredits in subtasks
Error
#129

Landing / Navigation

0m 0s0.8 cr needed
Done
#130

Landing / Hero Console

0.8 cr used
Cancelled
#131

Landing / Local Stack Overview

0.8 cr used
Cancelled
#132

Landing / Local Outputs And Review

0.8 cr used
Cancelled
#133

Landing / Footer

0m 0s0.8 cr needed
Done
#134

Retry First Page

1m 20s0.2 cr used
Error
#137

Landing

4m 38sCredits in subtasks
Error
#140

Landing / Navigation

0m 0s0.8 cr needed
Done
#141

Landing / Hero Console

0.8 cr used
Cancelled
#142

Landing / Local Stack Overview

0.8 cr used
Cancelled
#143

Landing / Local Outputs And Review

0.8 cr used
Cancelled
#144

Landing / Footer

0m 0s0.8 cr needed
Done
#145

Retry First Page

1m 14s0.2 cr used
Error
#148

Landing

16m 31sCredits in subtasks
Done
#159

Repair Landing JSX

1m 11s0.2 cr used
Done
#158

Repair Landing JSX

1m 7s0.2 cr used
Done
#157

Repair Landing JSX

1m 12s0.2 cr used
Done
#156

Repair Landing JSX

1m 5s0.2 cr used
Done
#151

Landing / Navigation

0m 0s0.8 cr needed
Done
#152

Landing / Hero Console

1m 34s0.8 cr used
Done
#153

Landing / Local Stack Overview

0m 43s0.8 cr used
Done
#154

Landing / Local Outputs And Review

0m 48s0.8 cr used
Done
#155

Landing / Footer

0m 0s0.8 cr needed
Done
#162

Design first page

0.1 cr used
Cancelled
#185

Landing

12m 27sCredits in subtasks
Done
#193

Landing / Navigation

0m 0s0.8 cr needed
Done
#188

Landing / Hero

1m 1s0.8 cr used
Done
#189

Landing / Zero Key Pipeline

0m 40s0.8 cr used
Done
#190

Landing / Local Stack

1m 8s0.8 cr used
Done
#191

Landing / Local Outputs

0m 32s0.8 cr used
Done
#192

Landing / Setup Guidance

0m 44s0.8 cr used
Done
#194

Landing / Footer

0m 0s0.8 cr needed
Done
#10

Login

8m 56sCredits in subtasks
Done
#31

Repair Login JSX

0m 39s0.2 cr used
Done
#30

Repair Login JSX

0m 41s0.2 cr used
Done
#21

Login / Navigation

0m 0s0.8 cr used
Done
#20

Login / Identity Console

0m 29s0.8 cr used
Done
#22

Login / Footer

0m 0s0.8 cr used
Done
#11

Dashboard

30m 29sCredits in subtasks
Error
#41

Repair Dashboard JSX

0m 58s0.2 cr used
Done
#40

Repair Dashboard JSX

0m 46s0.2 cr used
Done
#39

Repair Dashboard JSX

0m 48s0.2 cr used
Done
#38

Repair Dashboard JSX

0m 37s0.2 cr used
Done
#36

Repair Dashboard JSX

0m 38s0.2 cr used
Done
#34

Repair Dashboard JSX

0m 47s0.2 cr used
Done
#33

Repair Dashboard JSX

0m 36s0.2 cr used
Done
#32

Repair Dashboard JSX

0m 56s0.2 cr used
Done
#28

Dashboard / Navigation

0m 0s0.8 cr used
Done
#23

Dashboard / Pipeline Rail

1m 4s0.8 cr used
Done
#24

Dashboard / Run Console

1m 49s0.8 cr used
Done
#25

Dashboard / Asset Review

1m 36s0.8 cr used
Done
#26

Dashboard / Capability Cassette

1m 36s0.8 cr used
Done
#27

Dashboard / You Tube Optional

1m 15s0.8 cr used
Done
#29

Dashboard / Footer

0m 0s0.8 cr used
Done
#35

Retry Failed Pages

3m 12s0.2 cr used
Error
#37

Retry Failed Pages

7m 27s0.2 cr used
Error
#44

Design remaining pages

0.1 cr used
Error
#52

Design remaining pages

0.1 cr used
Error
#62

Login

Credits in subtasks
Cancelled
#63

Dashboard

Credits in subtasks
Cancelled
#73

Login

Credits in subtasks
Error
#74

Dashboard

Credits in subtasks
Error
#84

Login

0m 31sCredits in subtasks
Error
#93

Login / Navigation

Not recordedNo extra credits
Done
#92

Login / Identity Console

Not recordedNo extra credits
Done
#94

Login / Footer

Not recordedNo extra credits
Done
#85

Dashboard

0m 30sCredits in subtasks
Error
#95

Retry Failed Pages

0m 3s0.2 cr used
Error
#104

Login

Credits in subtasks
Cancelled
#105

Dashboard

Credits in subtasks
Cancelled
#115

Login

Credits in subtasks
Cancelled
#116

Dashboard

Credits in subtasks
Cancelled
#127

Login

Credits in subtasks
Cancelled
#128

Dashboard

Credits in subtasks
Cancelled
#138

Login

Credits in subtasks
Cancelled
#139

Dashboard

Credits in subtasks
Cancelled
#149

Login

Credits in subtasks
Cancelled
#150

Dashboard

Credits in subtasks
Cancelled
#163

Design remaining pages

0.1 cr used
Cancelled
#186

Login

2m 57sCredits in subtasks
Done
#196

Login / Navigation

0m 0s0.8 cr needed
Done
#195

Login / Access Console

0m 30s0.8 cr used
Done
#197

Login / Footer

0m 0s0.8 cr needed
Done
#187

Dashboard

5m 0sCredits in subtasks
Done
#202

Dashboard / Navigation

0m 0s0.8 cr needed
Done
#198

Dashboard / Pipeline Rail

1m 17s0.8 cr needed
Done
#199

Dashboard / Main Canvas

0m 57s0.8 cr used
Done
#200

Dashboard / Asset Review

0m 40s0.8 cr needed
Done
#201

Dashboard / You Tube Optional

1m 0s0.8 cr needed
Done
#203

Dashboard / Footer

0m 0s0.8 cr needed
Done
#5

Architecture

0.1 cr needed
Cancelled
#170

Architecture

0.1 cr used
Error
#178

Architecture

0.1 cr needed
Backlog
#205

Architecture

0.1 cr used
Error
#215

Architecture

0.1 cr used
Error
#218

Architecture

0.1 cr used
Error
#223

Architecture

0.1 cr used
Error
#226

Architecture

0.1 cr used
Error
#6

Workspace task plan

0.1 cr needed
Cancelled
#171

Workspace task plan

0.1 cr used
Error
#179

Workspace task plan

0.1 cr needed
Backlog
#206

Workspace task plan

0.1 cr used
Error
#216

Workspace task plan

0.1 cr used
Error
#219

Workspace task plan

0.1 cr used
Error
#224

Workspace task plan

0.1 cr used
Error
#227

Workspace task plan

0.1 cr used
Error
#46

Update Setup / Installer flow

0m 57sCredits unavailable
Invalid
#47

Update Solo Creator / Operator flow

0m 4sCredits unavailable
Done
#48

Update Landing

Credits unavailable
Invalid
#49

Update Login

3m 9sCredits unavailable
Invalid
#59

Update Landing

Credits unavailable
Invalid
#60

Update Login

Credits unavailable
Invalid
#97

Update Setup / Installer flow

0m 12sCredits unavailable
Done
#98

Update Solo Creator / Operator flow

0m 9sCredits unavailable
Done
#99

Update Landing

0m 6sCredits unavailable
Invalid
#100

Update Login

1m 12sCredits unavailable
Invalid
#164

Update Setup / Installer flow

Credits unavailable
Invalid
#165

Update Solo Creator / Operator flow

Credits unavailable
Invalid
#166

Update Landing

Credits unavailable
Invalid
#167

Update Login

Credits unavailable
Invalid
#183

Update Landing

Credits unavailable
Invalid
#184

Update Login

Credits unavailable
Invalid
#209

Update Setup / Installer flow

Credits unavailable
Backlog
#210

Update Solo Creator / Operator flow

Credits unavailable
Backlog
#211

Update Dashboard

Credits unavailable
Backlog
#212

Update Landing

Credits unavailable
Backlog
#213

Update Login

Credits unavailable
Backlog
Landing design preview
Landing: Review local setup requirements
Landing: Continue to setup guidance
Login: Sign in
Dashboard: 1. Check local capability status
Dashboard: 2. Read missing component guidance
Dashboard: Confirm capabilities ready
Dashboard: Run manual generation check
Dashboard: Verify degraded Shorts handling
Dashboard: Confirm end-to-end completion
Landing design preview
Landing: Review local setup requirements
Landing: Continue to setup guidance
Login: Sign in
Dashboard: 1. Check local capability status
Dashboard: 2. Read missing component guidance
Dashboard: Confirm capabilities ready
Dashboard: Run manual generation check
Dashboard: Verify degraded Shorts handling
Dashboard: Confirm end-to-end completion