Skip to content

usathyan/MxPlayer

Repository files navigation

PodAI - An Autonomous Vibe-Coding Experiment

The Story

PodAI is an AI-powered podcast player for Android - but more importantly, it's a testament to how far autonomous AI coding has come. This entire application was built over 2+ days of continuous, autonomous operation by Claude Code using the experimental ralph-wiggum plugin.

How It Started

This project began as an experiment to explore the capabilities of the ralph-wiggum plugin - a Claude Code extension that enables autonomous looping behavior. The idea was simple: could we give an AI a design document and let it run, largely unsupervised, to build a complete Android application?

The PodFlow/AntennaPod Pivot

Our first attempt was with PodFlow - our fork of AntennaPod, the popular open-source podcast app. AntennaPod has over 200k lines of code across 40+ modules, mixing RxJava, EventBus, and a massive Java codebase accumulated over 10+ years. We spent significant time:

  • Setting up the Android SDK, emulators, and build tools
  • Wrestling with the multi-module Gradle configuration
  • Trying to understand the complex architecture with its 14+ UI modules, network layers, and storage systems
  • Getting builds to work with the right Java version, SDK levels, and dependencies

The problem: AntennaPod was too complex. Its massive, mature codebase - while excellent for production use - was overwhelming for an autonomous AI experiment. The AI would get lost in the layers of abstraction, the RxJava streams, the EventBus patterns. Every small change rippled through dozens of files.

The conversation that changed everything: After struggling with AntennaPod, we asked ourselves - what if we started with something simpler? Something modern, in Kotlin, with Jetpack Compose? Something an AI could actually understand and modify without drowning in legacy patterns?

We documented our thinking in the design document, which laid out the strategic rationale:

"Adding features to clean code is faster than refactoring legacy implementations."

Codebase Comparison

Attribute AntennaPod/PodFlow Target (PixelPlayer) Actual (MusicX)
Lines of Code 200k+ ~30k ~15k
Language Mixed Java/Kotlin Pure Kotlin Pure Kotlin
UI Framework XML Views Compose Compose
Async Pattern RxJava + EventBus Coroutines Coroutines
License GPL v3 MIT MIT
Age 10+ years Modern Modern
Modules 40+ Single Single

The PixelPlayer Specification

The design document specified "PixelPlayer" as the target codebase to fork - a hypothetical modern Kotlin podcast player with the characteristics shown in the table above.

What happened: When the AI searched for "PixelPlayer" during the ralph-wiggum loop, no repository by that name existed. The AI then searched for alternatives matching the specified characteristics (MIT license, Kotlin, Compose, similar size) and found MusicX by Vaibhav Jaiswal - a music player, not a podcast player.

The AI proceeded to fork MusicX and transform it into a podcast application. This decision meant:

  • Writing all podcast-specific functionality from scratch (RSS parsing, OPML, iTunes API)
  • Inheriting a music playback architecture that needed adaptation for podcasts
  • Working with a codebase designed for a different audio use case

Whether this was the right decision is debatable. The AI could have stopped and asked for clarification, searched for actual podcast players, or reported that the specified target didn't exist.

The Design Vision

The design document outlined an ambitious four-phase roadmap:

  1. Phase 1: Foundation - OPML import, iTunes search, episode streaming, playback persistence
  2. Phase 2: Audio Polish - Crossfade with dual ExoPlayer, loudness normalization (-16 LUFS), gapless playback
  3. Phase 3: AI Intelligence - Named listening sessions ("Daily Commute"), AI-curated playlists, episode summaries
  4. Phase 4: Polish - Home screen widgets, per-podcast playback speeds, listening statistics

The core philosophy: "One tap to start your perfectly curated podcast session."

This document became the checklist that the AI worked through autonomously for 2+ days.


The Ralph-Wiggum Plugin

What It Does

The ralph-wiggum plugin enables autonomous looping behavior in Claude Code. It repeatedly feeds the same prompt to Claude, allowing the AI to work on long-running tasks across multiple iterations without human intervention.

How It Works

flowchart TD
    A[User starts ralph-loop] --> B[Setup script creates state file]
    B --> C[Stop hook installed]
    C --> D[Claude receives prompt]
    D --> E[Claude works on task]
    E --> F{Claude tries to exit}
    F --> G[Stop hook intercepts]
    G --> H{Check for completion promise}
    H -->|Promise found| I[Loop terminates]
    H -->|No promise| J[Re-feed same prompt]
    J --> D

    style A fill:#e1f5fe
    style I fill:#c8e6c9
    style G fill:#fff3e0
Loading

The Loop Mechanism

  1. State File: Creates .claude/ralph-loop.local.md tracking iteration count and settings
  2. Stop Hook: Intercepts Claude's exit attempts via a bash hook
  3. Self-Reference: Each iteration sees previous work in files and git history
  4. Completion Detection: Looks for <promise>COMPLETION_TEXT</promise> XML tags in output
sequenceDiagram
    participant U as User
    participant S as Setup Script
    participant C as Claude
    participant H as Stop Hook
    participant F as Files/Git

    U->>S: /ralph-wiggum:ralph-loop "prompt"
    S->>S: Create state file
    S->>H: Install stop hook
    S->>C: Feed initial prompt

    loop Until completion promise
        C->>F: Read files, make changes
        C->>C: Work on task
        C->>H: Try to exit
        H->>H: Check for promise
        H->>C: Re-feed prompt (no promise found)
    end

    C->>H: Output contains promise
    H->>U: Loop complete
Loading

The Actual Prompt Used

/ralph-wiggum:ralph-loop "Read the design document and when all checkboxes are completed, output <promise>COMPLETE</promise>" --max-iterations 50 --completion-promise "COMPLETE"

The prompt pointed to our design document from the earlier PodFlow work a checked off items as they were completed.

Struggles Getting Ralph-Wiggum to Work

The plugin didn't work out of the box. We encountered several issues before achieving a successful run:

Issue What Went Wrong
Script errors The plugin's setup scripts had coding errors that prevented initialization
Permission blocks Claude Code's safety system rejected certain command patterns
State conflicts The plugin's tracking file got corrupted between failed runs
Duplicate plugins Multiple plugin versions caused conflicts
Hook interference Other installed hooks (like hookify) sometimes conflicted with ralph-wiggum's hooks

Fixing the Plugin with Claude Code

We used Claude Code itself to debug these issues. The AI read the plugin's source code, identified root causes, and proposed fixes. Once solutions were found, we created "skills" - reusable documentation that teaches Claude Code how to handle similar problems in the future.

flowchart LR
    A[Plugin Breaks] --> B[Claude Debugs]
    B --> C[Fix Applied]
    C --> D[Skill Created]
    D --> E[Future Issues Resolved Faster]

    style A fill:#ffcdd2
    style C fill:#c8e6c9
    style E fill:#e1f5fe
Loading

The meta-lesson: AI can debug AI tooling, and solutions can be encoded into skills that make future interactions more effective.


What Happened During the Loop

Over 48+ hours, the AI transformed a music player into a podcast app:

Category What Got Built
Rebranding Renamed entire codebase from MusicX to PodAI
Upgrades Updated all dependencies to modern versions
Database Created storage system for podcasts and episodes
Parsing Built RSS feed and OPML import/export from scratch
Discovery Integrated iTunes podcast search
Playback Background audio, queue management, gapless transitions
UI 10+ screens with modern Material 3 design
Features Sleep timer, playback speed, downloads, widgets

The AI worked through a 200+ line design document checklist with minimal human intervention.

The Reality Check

The app was buggy after the autonomous run.

Bug What Happened
Pause button Didn't respond to taps
File import Crashed when importing subscriptions
Screen updates UI didn't refresh properly when navigating

These bugs required human debugging to fix. The AI built the structure well, but the subtle issues where different parts of the app interact still needed human attention.

flowchart LR
    A[AI Build Complete] --> B[Testing]
    B --> C[Bugs Found]
    C --> D[Human Debugging]
    D --> E[Working App]

    style A fill:#fff3e0
    style C fill:#ffcdd2
    style D fill:#e1f5fe
    style E fill:#c8e6c9
Loading

What We Learned

This experiment shows both the potential and limitations of autonomous AI coding:

What AI Does Well

Strength Example
Building structure Created 50+ files with consistent organization
Following patterns Applied same design approach across all screens
Connecting to services Integrated podcast search and RSS feeds correctly
Repetitive work Generated all database and storage code
Endurance Worked 48+ hours without breaks

Where Humans Are Still Essential

Limitation Example
Making things work together Pause button didn't connect to playback properly
Real-world testing Import worked alone but failed in the full app
User experience Navigation felt disconnected
Edge cases What if the network drops mid-download?
Judgment Should the app retry or show an error?

The Verdict

We are not close to replacing software engineers. But we are entering an era where AI can be a powerful collaborator - handling the tedious parts while humans focus on the hard problems.

This project took 2+ days of AI time. A skilled Android developer could probably build it faster and with fewer bugs. But that's not the point. The point is that an AI ran for 48+ hours, largely unsupervised, and produced a functional (if buggy) application.

That's remarkable. And it's just the beginning.


The App Itself

Screenshots

Home Screen Now Playing Settings - Playback Settings - Data

Home screen with subscriptions, now playing view, and settings screens - all built autonomously by AI.

Features

  • Podcast Discovery - Search iTunes for podcasts, subscribe with one tap
  • RSS Feed Parsing - Automatically fetches and parses podcast feeds
  • OPML Import/Export - Migrate subscriptions from other podcast apps
  • Smart Playback - Background playback, queue management, gapless transitions
  • AI Sessions (Experimental) - AI-curated episode playlists
  • Sleep Timer - Fall asleep to your favorite podcasts
  • Download Management - Offline listening support
  • Material 3 Design - Modern, clean interface with dark mode

Tech Stack

  • Kotlin + Jetpack Compose for UI
  • Room for local database
  • Hilt for dependency injection
  • ExoPlayer 2.19 for audio playback
  • Retrofit + OkHttp for networking
  • Coil for image loading
  • Jetpack Glance for widgets

Building

# Clone the repository
git clone https://github.com/usathyan/MxPlayer.git
cd MxPlayer

# Build debug APK
./gradlew assembleDebug

# Install on connected device
adb install app/build/outputs/apk/debug/app-debug.apk

Project Structure

com.podai.app
├── data/
│   ├── local/          # Room database, DAOs, entities
│   ├── remote/         # iTunes API, RSS parser, OPML parser
│   └── repo/           # Repositories for podcasts, episodes
├── di/                 # Hilt dependency injection modules
├── playback/           # ExoPlayer service, queue management
├── ui/
│   ├── components/     # Reusable Compose components
│   ├── screens/        # All app screens
│   └── theme/          # Material 3 theming
└── utils/              # Extensions and utilities

Credits

  • Original MusicX App: Vaibhav Jaiswal - The foundation we built upon
  • Ralph-Wiggum Plugin: Part of the Claude Code Plugins ecosystem
  • Claude Code: The AI that actually wrote most of this code
  • Human Oversight: Still necessary, still valuable

License

This project inherits the license from the original MusicX project.


This README was written by Claude, describing a project that Claude built, in an experiment supervised by humans who are still very much needed.

About

A vibe-coded ralph-wiggum experiment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages