feat(youtube): extract transcript highlights like Reddit comment gems
Add extract_transcript_highlights() that scores sentences by specificity (numbers, proper nouns, topic relevance) and filters YouTube filler (subscribe, welcome back, etc). Top 5 highlights shown as structured bullets in compact output. Full transcript moved to collapsible <details> block so the LLM reads highlights first, full text on demand. SKILL.md updated to instruct the judge agent to quote highlights directly in synthesis, same as Reddit top comments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -257,8 +257,15 @@ def render_compact(report: schema.Report, limit: int = 15, missing_keys: str = "
|
||||
lines.append(f"**{item.id}** (score:{item.score}) {item.channel_name}{date_str}{eng_str}{_xref_tag(item)}")
|
||||
lines.append(f" {item.title}")
|
||||
lines.append(f" {item.url}")
|
||||
if item.transcript_highlights:
|
||||
lines.append(" Highlights:")
|
||||
for hl in item.transcript_highlights[:5]:
|
||||
lines.append(f' - "{hl}"')
|
||||
if item.transcript_snippet:
|
||||
lines.append(f" Transcript: {item.transcript_snippet}")
|
||||
word_count = len(item.transcript_snippet.split())
|
||||
lines.append(f" <details><summary>Full transcript ({word_count} words)</summary>")
|
||||
lines.append(f" {item.transcript_snippet}")
|
||||
lines.append(" </details>")
|
||||
lines.append(f" *{item.why_relevant}*")
|
||||
lines.append("")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user