Skip to content

Composed Workflows

Composed workflows chain simpler workflows into end-to-end pipelines. They combine research, hook generation, and video production into single invocations.

Workflow: video/research_to_shorts

Deep research on a topic, generate viral hooks from findings, select the best hook, and produce a complete AI short video — grounded in real data.

Terminal window
fabric run video/research_to_shorts \
--input query="Why developers are switching to Rust" \
--input platform="TikTok" \
--input quality=premium
deep_research → bridge_research_to_hooks → generate_hooks →
select_best_hook → generate_script (research-grounded) →
video_production_pipeline
ParameterTypeDefaultDescription
querystringrequiredResearch topic
platformstring"TikTok"Target platform
duration_secsint45Video duration
moodstring"high-energy"Visual and narrative mood
qualitystring""Quality preset

Complete video with research-informed script and all intermediate artifacts (research synthesis, hooks, script, b-roll paths).


Workflow: composed/hot_topics_to_short

Scan trending topics, generate hooks, pick the strongest, and produce a single viral short video.

Terminal window
fabric run composed/hot_topics_to_short \
--input platform="YouTube Shorts" \
--input categories='["tech", "AI"]'
hot_topics_pipeline → bridge_topics_to_hooks → generate_hooks →
select_best_hook → generate_script → video_production_pipeline

Workflow: composed/hot_topics_to_content

Scan trending topics, generate hooks, and batch-produce content items (scripts, outlines, or posts).

Terminal window
fab-workflow composed/hot_topics_to_content \
--input categories='["tech", "business"]' \
--input num_content=5
hot_topics_pipeline → bridge_topics_to_hooks → generate_hooks →
generate_content_batch
{
"content_items": [
{
"topic": "...",
"hook": "...",
"hook_type": "controversial_take",
"estimated_strength": 0.87
}
]
}

Hot Topics to Content with Text Adaptation

Section titled “Hot Topics to Content with Text Adaptation”

Workflow: composed/hot_topics_to_content_with_text

Extended version that adds cross-platform text adaptation after content batch generation. Produces both content items and platform-native text for the top hook.

Terminal window
fab-workflow global/hot-topics-to-content-with-text \
--input categories='["tech", "AI"]' \
--input platforms=instagram,linkedin,twitter,threads \
--input tone_mode=narrative
hot_topics_pipeline → bridge_topics_to_hooks → generate_hooks →
generate_content_batch → bridge_content_to_platform_adapt →
adapt_for_platforms

Includes everything from hot_topics_to_content plus:

{
"platform_texts": [
{
"platform": "instagram",
"text": "Caption text adapted for Instagram...",
"hashtags": ["ai", "tech", "productivity"],
"char_count": 142,
"tone_mode": "narrative"
},
{
"platform": "linkedin",
"text": "Professional post adapted for LinkedIn...",
"hashtags": ["artificialintelligence", "techleadership"],
"char_count": 847,
"tone_mode": "narrative"
}
]
}

Workflow: composed/research_to_video

Research a topic, generate hooks, then fan out N parallel AI Shorts runs — one per hook. Produces multiple videos from a single research session.

Terminal window
fabric run composed/research_to_video \
--input topic="AI replacing junior developers" \
--input videos=3 \
--input quality=premium
deep_research → generate_hooks → select_top_N →
fork(ai_shorts × N)
ParameterTypeDefaultDescription
topicstringrequiredResearch topic
videosint3Number of videos to produce
qualitystring""Quality preset for all videos
--from-researchstringReuse prior research output file
--from-hooksstringReuse prior hooks output file

Workflow: composed/my_research_hooks

Lightweight pipeline: research a topic and extract viral hooks. No video production.

Terminal window
fabric run composed/my_research_hooks --input query="AI agents in production"
deep_research → bridge_to_hooks → generate_hooks
{
"hook_ideas": [
{
"hook_text": "Most AI agents fail in production. Here's why.",
"hook_type": "controversial_take",
"emotional_trigger": "fear_of_failure",
"estimated_strength": 0.91
}
]
}

Workflow: composed/epic_remix

Takes a YouTube, TikTok, or Instagram video, detects its most epic moments, extracts the key ideas, then generates a completely original short-form video inspired by those ideas — styled to a user-defined persona. No source footage is reused.

Terminal window
# With a style profile JSON file
fabric run composed/epic_remix \
--input url="https://youtube.com/watch?v=..." \
--input style_profile='{"tone":"sarcastic and irreverent","persona":"tech skeptic who has seen it all"}'
Terminal window
# CLI shorthand
python -m workflows.composed.epic_remix "https://youtube.com/watch?v=..." \
--tone "sarcastic and irreverent" \
--persona "tech skeptic who has seen it all" \
--hooks-style "rhetorical questions" \
--visual-aesthetic "warm film grain"
# Ideas only (no video generation)
python -m workflows.composed.epic_remix "https://tiktok.com/@user/video/123" \
--tone "warm and educational" --persona "excited science nerd" \
--ideas-only
transcription → detect_viral_moments → extract_epic_ideas →
generate_remix_script (style-aware) → video_production_pipeline
ParameterTypeDefaultDescription
urlstringrequiredYouTube, TikTok, or Instagram video URL
style_profileobjectrequiredStyle profile (see below)
platformstring"TikTok"Target platform
duration_secsint45Video duration
qualitystring"premium"Quality preset (cheap, premium, ultra, local)
num_clipsint5How many epic moments to detect
top_k_ideasint3How many ideas to extract for remix
moodstringfrom toneOverride mood (defaults to style tone)

The style profile controls the voice, visual aesthetic, and personality of the generated video. Only tone and persona are required.

{
"tone": "sarcastic and irreverent",
"persona": "tech skeptic who has seen it all",
"hooks_style": "rhetorical questions",
"visual_aesthetic": "warm film grain",
"vocabulary": "casual gen-z slang",
"catchphrases": ["here's the thing though", "let me cook"],
"avoid": ["clickbait", "fear mongering"]
}

The style flows through every production step:

  • Script narration — persona and tone override the default “virality strategist” voice
  • Avatarpresenter_look derived from persona description
  • B-rollvisual_aesthetic embedded in every broll prompt and the continuity brief
  • Background music — mood derived from tone instead of generic “viral TikTok energy”
{
"output_path": "/tmp/fabric_effects.mp4",
"epic_ideas": {
"themes": ["Strategic Negotiation", "Power Dynamics"],
"key_ideas": [
{
"idea": "A coach's history of leveraging job offers reveals a consistent pattern...",
"talking_points": ["..."],
"emotional_core": "surprise, intrigue",
"controversy_angle": "Is this strategic leveraging brilliant or disloyal?"
}
],
"original_creator_style": "analytical and opinionated...",
"remix_opportunities": ["Create a 'Playbook' series...", "Host a debate panel..."]
},
"script": { "full_narration": "...", "segments": [...] },
"duration": 29.4
}

Workflow: video/video_to_shorts

Extract viral clips from a longer video (podcast, talk, lecture) and produce short-form content.

Terminal window
fabric run video/video_to_shorts \
--input url="https://youtube.com/watch?v=..."
transcription → detect_viral_moments → extract_clips →
reframe_to_vertical → burn_subtitles → compose_final

Workflow: youtube/studio

Complete YouTube metadata preparation: transcribe, generate title options, create thumbnails, and write description with chapters.

Terminal window
fabric run youtube/studio --input url="https://youtube.com/watch?v=..."
transcription → title_generation → thumbnail_generation →
description_generation → collect_output
{
"title": "Selected title",
"title_options": [...],
"thumbnail": "/tmp/thumbnail.png",
"description": "Full YouTube description with chapters...",
"transcript": [...],
"duration": 345.6
}

Workflow: composed/topic-to-platforms-chain

Sequential rethink chain — one topic produces 8 platform-native posts, each re-derived from the topic (not re-formatted from a single source). Counterpart to the parallel global/platform-adapt for cases where deeper platform adaptation matters more than throughput.

The order is deliberate: each step inherits constraints discovered by the prior one.

twitter → linkedin → instagram → tiktok → youtube → newsletter → threads → facebook

Twitter goes first because its 280-char limit forces the tightest articulation of the core idea; each later step expands or reframes from there.

Terminal window
fabric run composed/topic-to-platforms-chain \
--input topic="Why most prompt-engineering advice is wrong"
rethink_chain (one LLM call per platform, sequential, prior outputs as context)
{
"platform_posts": [
{"platform": "twitter", "text": "...", "hashtags": [], "angle": "...", "char_count": 268},
{"platform": "linkedin", "text": "...", "hashtags": ["..."], "angle": "...", "char_count": 1240}
]
}
  • Pass a BrandVoice object (or dict) as brand_voice to apply per-platform tone overrides; a bare string is also accepted for backward compatibility with global/platform-adapt.
  • Override or shorten the platforms list to skip channels.
  • Each step is its own LLM call — expect ~8× the latency and cost of global/platform-adapt. Use that workflow when you want fan-out, this one when you want platform-native depth.