Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Content Studio Catalogue & Desktop App

Yanshi’s Content Studio turns raw sources — a topic idea, web URLs, GitHub repositories, academic PDFs, or audio/video recordings — into finished, downloadable deliverables through a deterministic five-stage pipeline (RFC_CONTENT_STUDIO.md):

  1. Sources — ingest web search results, pages (http with SSRF protection), codebases (repo_snapshot), PDFs (pdf_extract), arXiv source tarballs (arxiv), or recordings (video_ingest + asr).
  2. Planner — optional content-level planning (examples/applications/content-studio/ or interactive type: agent clarification via ask_user).
  3. Generators — hand-authored, schema-validated DAG templates under examples/generators/ with structured JSON outputs and chunk-level citations.
  4. Renderers — embedded pure-Rust writers (render_slides + native OOXML .pptx, render_table .xlsx/.csv, render_svg, render_mindmap, render_study, render_markdown) plus OS-sandboxed media/typesetting tools (typst, pandoc, ffmpeg, d2, lualatex, ContainerBackend Python).
  5. Artifacts — first-class FlowValue::File outputs stored on disk with SHA-256 manifests, downloadable via CLI --output-dir, /v1/runs/{id}/artifacts, Web Studio, or the Yanshi Studio desktop app.

Built-in Generator Catalogue (15 Workflows)

Every template in examples/generators/ validates under yanshi workflow validate --strict and can be executed from the CLI, the HTTP gateway, /ui/studio, /ui/app, or the macOS/Windows/Linux desktop app.

1. Keynote Slides, Video & Audio

TemplatePrimary InputsDeliverablesVisual & Media Highlights
illustrated_slides.ymlsubject, audience, slide_count, slide_theme (dark/light), style_presetInteractive .html deck, native editable OOXML .pptx, 16:9 .pdfWeb grounding → slide visual routing across AI illustration (6 art presets), D2 figure, and native editable shapes/tables/code
tech_slides_video.ymltopic, repo_url, pdf_source, presenter_mode (spotlight/pip/intro_outro)1080p narrated .mp4, .srt/.vtt subtitles, .pptx, 16:9 .pdf, .htmlProgressive step-by-step slide builds synced millisecond-accurately to expressive TTS, spotlight rings, optional PiP presenter video
slides.ymlurl / text / chunks, focus, enable_illustrations, style_presetNative editable .pptx, 16:9 .pdf, .htmlSource-grounded presentation with self-repairing vector figure diagrams and optional illustration visuals (works with zero image keys by default)
video_overview.ymlurl / text, image_model, tts_model, video_model (optional)Narrated .mp4 + .srtParallel scene illustration (text_to_image or optional text_to_video motion shots) + per-scene tts + render_video muxing
audio_overview.ymlurl / text, minutes, tts_model, host_voice, guest_voiceLoudness-normalised .mp3Two-speaker conversational script voiced in parallel and EBU R128 normalised via render_audio

Slide Visual Routing & Art-Direction Presets

Slide workflows (illustrated_slides.yml, slides.yml, tech_slides_video.yml) classify each slide’s visual layout automatically:

  • illustration — conceptual, cover, analogy, and summary slides are rendered by IllustrationNode with optional LLM art-director prompt refinement (refine_prompt: true), canvas palette harmonization (dark #0B1120 / light #F8FAFC), and strict anti-text guardrails across six style_preset modes:
    • editorial_tech (default) — editorial publication illustration with crisp geometric forms
    • isometric_3d — clean 3D isometric miniature with soft studio lighting
    • flat_vector — Swiss-grid geometric vector art with bold silhouettes
    • blueprint_schematic — precision architectural/engineering CAD schematic
    • scientific_diagram — textbook-grade layered cross-section visual
    • cinematic_keynote — dramatic wide-angle keynote hero visual
  • arch_diagram — system topology and dataflow slides compile validated vector SVG diagrams via figure (language: d2 / svg / typst / tikz / python) with automatic compile-error feedback repair.
  • structured_panel — code walkthroughs, benchmarks, and checklists emit native editable PowerPoint shapes, <a:tbl> tables, <p:cxnSp> connectors, and monospace callouts directly via pure-Rust OOXML (export_pptx: true).

2. Daily Engineering & Research Workflows

TemplatePrimary InputsDeliverablesWorkflow Highlights
repo_architecture.ymlsource (GitHub URL or local dir), git_ref, subpath, focusD2 system & module dependency .svg/.png, .pdf, .html, .mdrepo_snapshot scans directory tree, manifests, and internal imports without executing untrusted repo code
backend_project_planner.ymlidea, tech_preference, interactive (true/false), max_questionsSystem arch, module dep, UML class/sequence, flowchart & ER .svg, PostgreSQL .sql DDL, mindmap, full spec .pdfMulti-turn HITL ask_user clarification pauses the run in Studio/CLI to confirm scale and constraints before generating full specs
paper_reader.ymlsource (arXiv URL, PDF URL, or local PDF), target_lang, max_pagesBilingual digest .pdf/.html, extracted experiment tables .xlsx/.csv, method diagram .svg, mindmappdf_extract + structured experimental benchmark extraction into numeric Excel sheets
video_summarizer.ymlsource (video URL or local media file), subtitle_langs, asr_modelTimestamped summary .pdf/.html, .srt subtitles (native or ASR + optional bilingual polish), mindmapvideo_ingest prefers native captions and falls back automatically to FFmpeg audio extraction + asr

3. Sourced Reports, Diagrams & Study Kits

TemplatePrimary InputsDeliverablesWorkflow Highlights
report.ymlurl / text / chunks, focus, sections, pdfFootnoted .md, self-contained .html, typeset .pdfParallel map section drafting with verbatim source quotes and chunk citations
infographic.ymlurl / text / chunks, focus.svg and high-DPI .pngDeterministic Tera SVG poster layout driven by schema-validated headline metrics
mindmap.ymlurl / text / chunks, depthVector .svg, .png, interactive markmap .htmlHierarchical tree extraction rendered via embedded render_mindmap + render_svg
circuit_diagram.ymldescription, textChecked schematic .svg and .pngExtracts a typed parts list first, then verifies every component ID/kind in circuitikz before lualatex compile
flashcards.ymlurl / text / chunks, countInteractive flip-card .html + JSON deckSelf-contained offline study page rendered by render_study (kind: flashcards)
quiz.ymlurl / text / chunks, countSelf-grading multiple-choice .html + JSONInstant explanation and score tally via render_study (kind: quiz)

Quickstart Commands

CLI One-Liners

# 1. Illustrated Keynote Deck (.pptx + 16:9 .pdf + interactive .html)
yanshi workflow run examples/generators/illustrated_slides.yml \
  --input subject "Rust Async Runtime & Work-Stealing Scheduler" \
  --input style_preset editorial_tech \
  --output-dir out/slides

# 2. Academic Paper Reader (arXiv/PDF -> .pdf dossier + .xlsx tables + D2 diagram)
yanshi workflow run examples/generators/paper_reader.yml \
  --input source "https://arxiv.org/abs/1706.03762" \
  --output-dir out/paper

# 3. GitHub Repository Architecture Analysis
yanshi workflow run examples/generators/repo_architecture.yml \
  --input source "https://github.com/tokio-rs/axum" \
  --output-dir out/axum-arch

# 4. Multi-Deliverable Planner Skill (one source -> report + mindmap + audio)
yanshi skill run examples/applications/content-studio \
  --input url=https://example.org/article \
  --input want=report,mindmap \
  --output-dir out/studio

Cap total LLM + media spend on any run with cost_limit_usd in YAML or --checkpoint to resume interrupted multi-stage pipelines without re-billing completed nodes:

yanshi workflow run examples/generators/tech_slides_video.yml \
  --checkpoint --timeout 15m \
  --input topic "Zero-Copy Networking in Rust" \
  --output-dir out/lecture

# If interrupted at a late stage, resume from the last completed node:
yanshi workflow resume <run_id> examples/generators/tech_slides_video.yml \
  --output-dir out/lecture

Web Studio (/ui/studio & /ui/app)

Start yanshi-server and open:

  • http://127.0.0.1:8080/ui/app — App Runner: pick any of the 15 templates, fill in the generated input form, answer inline ask_user clarification cards if prompted, and preview/download finished .pptx, .pdf, .mp4, .xlsx, and .html deliverables.
  • http://127.0.0.1:8080/ui/studio — Visual DAG Studio: inspect and edit the workflow graph on an interactive canvas, set per-node breakpoints, step through evaluated inputs/outputs, and preview rendered slides or media inline.

Desktop App (Yanshi Studio via Tauri v2)

yanshi-ui/src-tauri packages the full Studio and App Runner as a standalone desktop app with an in-process local execution engine (local_engine.rs) — no PostgreSQL or external server process required. It automatically loads ~/.yanshi/.env, seeds the bundled 44-model pricing table (config/pricing.prod.yml), and supports interactive ask_user HITL prompts offline.

On macOS, build and install Yanshi Studio.app directly into /Applications:

# Build release bundle and stage into /Applications/Yanshi Studio.app
./scripts/install_desktop.sh --open

# Re-install an already built bundle without recompiling
./scripts/install_desktop.sh --skip-build

Check external rendering binaries (ffmpeg, ffprobe, pandoc, typst, d2) at any time with:

yanshi doctor --profile local