shorts-from-peaks
Tool order
search_videos(query, n, shorts)- searches YouTube, ranks results (views, virality) and stores them with their top peaks.list_sourcesshows what is already stored. Prefer official or permitted sources.get_peaks(video_id)- heatmap peaks of a stored source. No heatmap = say so; propose another source or a manual window, never invent peaks.create_clip_project(video_id, peak_rank=1, hook_text)- editor draft from a peak, or passstart/endseconds for a manual window (runs directly).render_project(video_id, hook_text, custom_script)- renders the draft in the background (runs directly); pollget_job(job_id). Itschecks_failedlists failing transformation checks.- Fix failing checks, then ask to add it to the queue with
queue_add(project_id)(needs confirmation).ui_open("editor", video_id)shows it to the user.
- No heatmap, or a long upload/link the user owns:
autoclip_source(url, length, max_clips, prompt, create_drafts)finds the best moments from the transcript and returns ranked clips (pollget_job); withcreate_drafts=truethey land in the editor.
Reading peaks
- Values are normalized 0-1. A peak is a local maximum >= 0.8; peaks closer than 10 s merge into one.
- Ignore a spike in the first 5% of the video (intro artifact). Keep the top 3 by value.
- Report each peak as
start-end,peak_value,rankfrom the tool, with the video title and URL.
Cut window
- Total length 15-30 s (hard max 30 s: the transformation gate rejects longer).
- Start 3-5 s before the peak so the viewer gets the setup; end 2-4 s after the payoff. Cut at a sentence or action boundary.
- Clamp to the video duration. Never use more than 50% of the runtime from one third-party clip: add B-roll, images or data cards.
- One moment per Short. Two peaks only if they are the same story beat.
Hook (first 3 seconds)
- A question, a stake or a surprising claim read over the first frame, plus a big on-screen headline (max 6 words).
- Use only facts present in the title, description or transcript; label rumors as "RUMOR".
- Narration: sentences <= 8 words, about 2.5 words/s, hook -> context -> payoff at the peak -> short CTA. The source's own audio stays low or off; the narrator leads.
Transformation checks (all five must pass; see docs/LEGAL.md)
narration: original narration present.visual_layers: at least 2 added layers (text, images/stickers, B-roll, data card).text_overlay: hook or text on screen.duration: 30 s or less.source_credit: source credited in every platform caption. If one fails, fix the project and re-render; re-rendering invalidates any earlier approval.
Captions and text
- Word-by-word captions, 2-4 words per group, bold sans font, white with black outline, active word highlighted.
- Keep captions out of the bottom ~12% and sides ~6% (platform UI). Emojis only if the channel style uses them.
Title, caption, hashtags
- Title/first line = the hook, under 80 characters. One sentence of context.
- 3-5 hashtags: 1 niche, 1-2 topic, 1 broad. No banned or misleading tags.
- Always include
Source: <channel> - <URL>. - Template:
references/clip-brief.md.
AI disclosure
Synthetic narration (TTS) or AI visuals require the per-post AI-disclosure flag before approval, plus the platform's own AI label on upload. Remind the user in the confirm card.
Do not
- Post a raw clip, a clip over 30 s, or a clip without narration.
- Use a source the user marked blocked or that is private/members-only/sign-in-only.
- Add to the queue, schedule or delete without the user's confirmation.