Devpost Submission — CodePilot

Project Name

CodePilot

Tagline

Understand any codebase in seconds, not days.

Inspiration

Every developer has experienced the pain of joining a new team or contributing to an open-source project — spending hours (or days) reading through unfamiliar code, trying to understand the architecture, find entry points, and figure out where to make changes. We wanted to build an autonomous agent that eliminates this friction entirely. Paste a GitHub URL, and within seconds you have a complete architecture overview and an AI assistant that knows every corner of the code.

What it does

CodePilot is an autonomous codebase onboarding agent. You paste a GitHub repository URL, and it:

  1. Fetches the repo structure via GitHub's REST API — works with both public and private repositories
  2. Intelligently selects the most important files — READMEs, configs, entry points, core source — using smart pattern matching across 30+ key file patterns. For a repo like shadcn/ui with 7,400+ files, it zeroes in on the 30 that matter most
  3. Generates a deep AI analysis using Augment Code's Auggie SDK — covering architecture, tech stack, key components, data flow, and getting-started guides
  4. Indexes the knowledge into Senso.ai for semantic retrieval during chat
  5. Presents an instant architecture overview — the moment you land on the chat page, you see a full breakdown of the project before you even ask a question
  6. Provides an interactive chat interface where you can ask anything about the codebase and get specific, file-referenced answers

No manual configuration. No setup. Just paste and go.

How we built it

  • Next.js 16 with App Router, React 19, and TypeScript for the full-stack framework
  • Augment Code (Auggie SDK) as the primary AI engine — powers both the autonomous analysis pipeline and the conversational chat. The SDK communicates with the Auggie CLI via the ACP protocol, producing remarkably code-aware responses that reference actual file paths and architectural patterns
  • assistant-ui for the ChatGPT-like React chat interface, using the Vercel AI SDK v6 streaming protocol (UIMessageStream with text-start/text-delta/text-end lifecycle)
  • Senso.ai for knowledge indexing and semantic retrieval — analyzed codebase content is indexed as articles and queried contextually when users ask questions
  • DigitalOcean App Platform for hosting and deployment, with auto-deploy on push from GitHub

The analysis pipeline is fully autonomous:

GitHub URL → Fetch repo tree → Smart file selection → Auggie deep analysis → Senso indexing → Welcome overview + Interactive chat

Challenges we ran into

  • Auggie SDK in a serverless context: The SDK spawns a CLI binary as a child process, so we had to ensure node_modules/.bin was on PATH using import.meta.url for reliable resolution across environments
  • The AI reading its own code: When deployed, Auggie would analyze CodePilot's own source files instead of the target repo. We solved this by running Auggie from an isolated temp workspace with a minimal .git directory, and inlining all repo context in a self-contained prompt with explicit boundary instructions
  • Streaming protocol precision: assistant-ui's streaming protocol requires exact message lifecycle management — text-starttext-deltatext-end. Missing the start chunk causes silent failures
  • Cloud deployment auth: Auggie requires a session file at ~/.augment/session.json. For DigitalOcean, we write this from an encrypted environment variable at boot time
  • Pivoting from OpenAI: Our initial OpenAI key hit quota limits, so we pivoted to using Augment Code as the sole LLM — which actually produced better code-specific responses than a general-purpose model

Accomplishments we're proud of

  • True autonomy: Paste a URL → get a complete architecture overview + interactive chat. Zero configuration, zero prompting needed
  • Instant value: The welcome analysis panel gives you a full understanding of any repo before you even ask a question — we tested it on shadcn/ui (110K stars, 7,400 files) and it nailed the monorepo structure, registry system, and component patterns
  • Smart file selection: From 7,400 files, CodePilot intelligently picks the 30 that matter — package.json, READMEs, core source, configs — no tokens wasted on node_modules or generated files
  • Private repo support: Optional GitHub token authentication, used only for that single request
  • Production deployed: Live on DigitalOcean App Platform with auto-deploy from GitHub on every push

What we learned

  • Augment Code excels at code understanding — it produces significantly higher-quality architectural analysis than general-purpose LLMs because it's purpose-built for code
  • assistant-ui makes chat UX trivial — but the streaming protocol has sharp edges that require careful implementation
  • Constraining AI agents is as important as empowering them — half our debugging was preventing Auggie from being too helpful (reading local files, exploring the filesystem) when we needed it to stay focused on provided context
  • Build for deployment from day one — env var-based auth and isolated workspaces saved us when moving from local dev to DigitalOcean

What's next for CodePilot

  • Persistent storage: Replace in-memory store with a database so analyzed repos survive restarts
  • Multi-repo context: Analyze multiple related repos and cross-reference them in chat
  • Code navigation: Click file references in chat responses to view actual source code inline
  • PR review mode: Analyze pull requests and explain what changed and why
  • Team sharing: Share analyzed repos with teammates via shareable links
  • Deeper Senso integration: Use semantic search to surface relevant code snippets within chat responses

Built With

  • nextjs
  • react
  • typescript
  • augment-code
  • assistant-ui
  • senso-ai
  • digitalocean
  • tailwind-css
  • vercel-ai-sdk

Try it out

Built With

Share this project:

Updates