# Prompt Sprint 4 - Content Generation ## 🎯 Sprint 4: Content Generation **Iniziato**: 2026-04-06 **Stato**: 🟑 In Progress **Assegnato**: @sprint-lead --- ## πŸ“‹ Obiettivo Implementare la generazione di contenuti multi-formato da parte di NotebookLM. Supportare audio (podcast), video, slide, infografiche, quiz, flashcard, report, mappe mentali e tabelle dati. --- ## πŸ—οΈ Architettura ### Pattern (stesso di Sprint 1-3) ``` API Layer (FastAPI Routes) ↓ Service Layer (ArtifactService) ↓ External Layer (notebooklm-py client) ``` ### Endpoints da implementare (9 totali) 1. **POST /api/v1/notebooks/{id}/generate/audio** - Generare podcast 2. **POST /api/v1/notebooks/{id}/generate/video** - Generare video 3. **POST /api/v1/notebooks/{id}/generate/slide-deck** - Generare slide 4. **POST /api/v1/notebooks/{id}/generate/infographic** - Generare infografica 5. **POST /api/v1/notebooks/{id}/generate/quiz** - Generare quiz 6. **POST /api/v1/notebooks/{id}/generate/flashcards** - Generare flashcard 7. **POST /api/v1/notebooks/{id}/generate/report** - Generare report 8. **POST /api/v1/notebooks/{id}/generate/mind-map** - Generare mappa mentale 9. **POST /api/v1/notebooks/{id}/generate/data-table** - Generare tabella ### Endpoints gestione artifacts 10. **GET /api/v1/notebooks/{id}/artifacts** - Listare artifacts 11. **GET /api/v1/artifacts/{id}/status** - Controllare stato 12. **GET /api/v1/artifacts/{id}/download** - Scaricare artifact --- ## πŸ“Š Task Breakdown Sprint 4 ### Fase 1: Specifiche - [ ] SPEC-007: Analisi requisiti Content Generation - [ ] Definire parametri per ogni tipo di contenuto - [ ] Definire stati artifact (pending, processing, completed, failed) ### Fase 2: API Design - [ ] API-006: Modelli Pydantic per ogni tipo di generazione - [ ] Documentazione endpoints ### Fase 3: Implementazione - [ ] DEV-015: ArtifactService - [ ] DEV-016: Tutti gli endpoint POST /generate/* - [ ] DEV-017: GET /artifacts - [ ] DEV-018: GET /artifacts/{id}/status ### Fase 4: Testing - [ ] TEST-008: Unit tests ArtifactService - [ ] TEST-009: Integration tests generation API --- ## πŸ”§ Implementazione ### ArtifactService Methods ```python class ArtifactService: async def generate_audio(notebook_id, instructions, format, length, language) async def generate_video(notebook_id, instructions, style, language) async def generate_slide_deck(notebook_id, format, length) async def generate_infographic(notebook_id, orientation, detail, style) async def generate_quiz(notebook_id, difficulty, quantity) async def generate_flashcards(notebook_id, difficulty, quantity) async def generate_report(notebook_id, format) async def generate_mind_map(notebook_id) async def generate_data_table(notebook_id, description) async def list_artifacts(notebook_id) async def get_status(artifact_id) async def download_artifact(artifact_id) ``` ### Modelli ```python # Request models class AudioGenerationRequest(BaseModel): instructions: str format: str # deep-dive, brief, critique, debate length: str # short, default, long language: str class VideoGenerationRequest(BaseModel): instructions: str style: str # whiteboard, classic, anime, etc. language: str class QuizGenerationRequest(BaseModel): difficulty: str # easy, medium, hard quantity: str # fewer, standard, more # Response models class Artifact(BaseModel): id: UUID notebook_id: UUID type: str # audio, video, quiz, etc. title: str status: str # pending, processing, completed, failed created_at: datetime completed_at: datetime | None download_url: str | None ``` --- ## 🎨 Content Types ### Audio (Podcast) - Formats: deep-dive, brief, critique, debate - Length: short, default, long - Languages: en, it, es, fr, de ### Video - Styles: whiteboard, classic, anime, kawaii, watercolor, etc. - Languages: multi-language support ### Slide Deck - Formats: detailed, presenter - Length: default, short ### Infographic - Orientation: landscape, portrait, square - Detail: concise, standard, detailed - Styles: professional, editorial, scientific, etc. ### Quiz / Flashcards - Difficulty: easy, medium, hard - Quantity: fewer, standard, more ### Mind Map - Instant generation (no async) ### Data Table - Custom description for data extraction --- ## πŸš€ Prossimi Passi 1. @sprint-lead: Attivare @api-designer per API-006 2. @api-designer: Definire tutti i modelli generation 3. @tdd-developer: Iniziare implementazione ArtifactService --- **Dipende da**: Sprint 3 (Chat) βœ… **Blocca**: Sprint 5 (Webhooks) πŸ”΄ **Nota**: Questo Γ¨ lo sprint piΓΉ complesso con 12 endpoint da implementare!