Skip to content
This repository was archived by the owner on Sep 28, 2025. It is now read-only.

Implement automated media generation with VHS and Freeze agents#11

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-10
Draft

Implement automated media generation with VHS and Freeze agents#11
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-10

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 9, 2025

This PR implements a comprehensive automated media generation system using specialized AI agents that can analyze git commits and create demonstration content automatically.

Overview

The implementation introduces two new AI agents:

  • VHS Agent (vhs_agent): Generates terminal demonstration videos using VHS (Video Hyper Scripts)
  • Freeze Agent (freeze_agent): Creates beautiful SVG screenshots of code with syntax highlighting

Key Features

VHS Agent

  • Analyzes git commits to understand new features and changes
  • Generates VHS tape scripts that demonstrate functionality in engaging terminal recordings
  • Automatically configures appropriate terminal themes and settings for professional presentation
  • Creates GIF recordings that showcase practical usage scenarios and workflows

Freeze Agent

  • Identifies important code changes from git commits
  • Selects representative code snippets that effectively showcase modifications
  • Generates SVG images with syntax highlighting and consistent styling
  • Ensures visual appeal and readability in generated screenshots

Git Analysis Tool

  • Provides comprehensive repository analysis capabilities
  • Analyzes recent commits and categorizes file changes by programming language
  • Generates contextual summaries for agent consumption
  • Supports configurable commit history depth and branch selection

Technical Implementation

Tool Registry System

Created a scalable tool registration architecture in internal/tools/tools.go:

// RegisterTool registers a tool constructor with the global registry
func RegisterTool(name string, constructor func() BaseTool) {
    globalRegistry.tools[name] = constructor
}

// GetToolsForAgent returns the tools configured for a specific agent
func GetToolsForAgent(toolNames []string) []BaseTool {
    var tools []BaseTool
    for _, name := range toolNames {
        if tool := GetTool(name); tool != nil {
            tools = append(tools, tool)
        }
    }
    return tools
}

Agent Configuration

Updated agent system to load tools from configuration automatically:

{
  "agents": {
    "vhs_agent": {
      "name": "VHS Media Generator",
      "model": "copilot.claude-sonnet-4",
      "tools": ["git_analysis", "vhs"]
    },
    "freeze_agent": {
      "name": "Freeze SVG Generator", 
      "model": "copilot.gpt-4o-mini",
      "tools": ["git_analysis", "freeze"]
    }
  }
}

GitHub Actions Integration

Implemented automated workflow (.github/workflows/media-generation.yml) that:

  • Triggers on main branch pushes (can be disabled with [skip media] in commit messages)
  • Installs VHS and Freeze tools automatically
  • Sets up virtual display for headless terminal recording
  • Runs agents to analyze commits and generate media content
  • Uploads generated media as workflow artifacts
  • Comments on PRs with links to generated content

Usage Examples

Manual Generation

# Generate VHS content for recent changes
./tandem --prompt "Analyze recent commits and create a VHS demo showing the new features"

# Generate Freeze screenshots for code changes  
./tandem --prompt "Create SVG screenshots of important code changes from the latest commit"

Automated Generation

The system automatically generates media content when changes are pushed to the main branch. Generated files are available as workflow artifacts and can be downloaded from the Actions tab.

Documentation

Added comprehensive documentation in MEDIA_GENERATION.md covering:

  • Installation and setup instructions
  • Usage examples and configuration options
  • Troubleshooting guide for common issues
  • Contributing guidelines for extending functionality

The implementation provides a robust foundation for automated media generation that significantly boosts content creation and product visibility through AI-powered demonstration videos and code screenshots.

Fixes #10.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 9, 2025

@yyovil 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 9, 2025 13:42
Co-authored-by: yyovil <149292478+yyovil@users.noreply.github.com>
Co-authored-by: yyovil <149292478+yyovil@users.noreply.github.com>
Copilot AI changed the title [WIP] Automate media generation Implement automated media generation with VHS and Freeze agents Aug 9, 2025
Copilot AI requested a review from yyovil August 9, 2025 13:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate media generation

2 participants