DEV Community

Cover image for CodePulse AI: Turning Messy Pull Requests into 30-Second Voice Walkthroughs & Instant Security Audits
Meta Tech
Meta Tech

Posted on Fully Autonomous

CodePulse AI: Turning Messy Pull Requests into 30-Second Voice Walkthroughs & Instant Security Audits

This is a submission for the MLH x DEV Writing Challenge

What I Built

During crunch time—especially at 3:00 AM during a hackathon or right before a Friday production release—nobody wants to read a 600-line Pull Request description. Worse, rushed code reviews often miss subtle security flaws like exposed API keys, unvalidated inputs, or race conditions.

To solve this, my team built CodePulse AI, an automated GitHub integration and web dashboard that transforms raw git diffs into two actionable outputs within seconds of opening a PR:

  1. An Instant Security & Architecture Audit: Flags critical vulnerabilities, logic bugs, and performance bottlenecks directly as inline PR comments.
  2. A 30-Second "TL;DR" Voice Walkthrough: Generates a natural-sounding audio summary spoken like a senior teammate explaining why the changes were made and where reviewers should focus their attention.

What Inspired It

Halfway through Saturday afternoon, our team accidentally merged a broken authentication middleware because nobody had the mental bandwidth to read a massive diff while debugging the frontend. We realized that while reading dense code takes high cognitive load, listening to a quick 30-second voice note while grabbing coffee makes understanding context effortless.

What I Learned Along the Way

  • AST Parsing Over Raw Diffs: Feeding raw git diffs directly into an LLM wastes tokens and loses surrounding file context. We learned how to use Tree-sitter to extract modified functions and their immediate dependencies before constructing our prompts.
  • Webhook Idempotency: GitHub webhooks can fire multiple times on rapid commits. Implementing debounce queues and commit-hash caching prevented us from burning through our API credits in ten minutes.

How It Works in Action

  1. Trigger: A developer opens or updates a Pull Request on a connected GitHub repository.
  2. Analysis: Our webhook server fetches the diff, parses the affected syntax tree, and runs a dual-pass prompt for security auditing and conversational scriptwriting.
  3. PR Comment: Within ~12 seconds, the CodePulse bot posts a structured review table alongside an embedded audio player link right inside the GitHub PR thread.
  4. Trend Tracking: Teams can log into the web dashboard to inspect historical vulnerability trends across repositories.

Partner Technologies

Building CodePulse AI in 36 hours was only possible by combining several MLH partner technologies that handled the heavy lifting across AI reasoning, voice synthesis, database storage, and deployment:

1. Google Gemini API

We used Gemini 3.5 Flash as our core reasoning engine. Speed and a large context window were non-negotiable since we needed to pass entire file contexts alongside git diffs without making developers wait minutes for a CI check.

  • Implementation: We used Structured Outputs (JSON Schema) to force the model to return a deterministic payload containing severity_score, inline_comments[] (mapped to exact line numbers), and voice_script (strictly capped at 85 words for a ~30-second read).
  • Experience: Structured outputs saved us hours of regex parsing. Early on, the model was overly polite; tuning the system instructions to act as a concise, pragmatic staff engineer dramatically improved signal-to-noise ratio.

2. ElevenLabs

Text summaries still get skimmed, so we integrated the ElevenLabs Text-to-Speech API (eleven_flash_v2_5 model) to convert the voice_script output from Gemini into realistic developer voiceovers.

  • Implementation: Once Gemini returns the script, our Node.js backend streams the text to ElevenLabs and pipes the resulting MP3 buffer directly to cloud object storage, generating a shareable URL embedded in the GitHub PR comment.
  • Experience: The ultra-low latency of the Flash model meant audio generation added less than 1.5 seconds to our overall pipeline. Hearing our messy midnight commits explained back to us in a calm, clear voice felt surreal.

3. MongoDB Atlas

Every PR scan generates structured telemetry—types of vulnerabilities caught, files most frequently flagged, and review turnaround times. We stored all repository configurations, webhook logs, and audit histories in MongoDB Atlas.

  • Implementation: Since git payloads and AI review comments vary wildly in shape depending on the language and PR size, MongoDB's flexible document model allowed us to iterate on our schema on the fly without running migration scripts at 4:00 AM. We also used MongoDB Aggregation Pipelines to power the "Repo Health Score" charts on our frontend.

4. GitHub Apps & .tech Domains

We packaged our integration as an installable GitHub App using Octokit to post inline review comments directly on exact diff lines, and deployed our dashboard on a custom .tech domain picked up from the MLH partner perks pack.

Hackathon Experience

We built CodePulse AI at this November!

The energy from kickoff to submission deadline was electric. I teamed up with two developers I met during the Friday evening team-formation mixer—none of us had worked together before, and one teammate was attending their very first hackathon. Watching everyone debug hardware rigs, pitch wild ideas, and crowd around the midnight snack table reminded me why hacker communities are the best place to learn new stacks fast.

What I'll remember most: At 5:30 AM on Sunday, our ElevenLabs audio stream kept corrupting half-way through playback. Three sleep-deprived engineers staring at buffer encodings finally realized we forgot a single await before closing the upload stream. When the clean audio finally played through our speakers explaining the exact bug we had just fixed, our entire table erupted in cheers.

Win or lose, shipping a working end-to-end tool with new friends in a single weekend is an unbeatable feeling. Drop a comment below if you've ever merged a PR without reading it—we built this for you!

Top comments (0)