Inspiration

We noticed a critical "Context Blind Spot" in modern AI coding. Generic assistants like ChatGPT or Copilot operate as text predictors—they are great at writing isolated functions but terrible at navigating established codebases. They often "hallucinate" non-existent utilities, ignore project-specific architectural patterns, and suggest unsafe changes because they lack deep context. This leads to broken builds, wasted review cycles, and significant friction during developer onboarding.

We realized developers don't just need faster code generation; they need grounded guidance. We wanted to build a "Project Navigator" rather than just a text predictor—an AI that anchors every response in the reality of the actual repository.

What it does

RepoPilot AI is a "Chat with your Repo" interface that serves as an intelligent onboarding buddy and coding assistant.

  1. Link: You provide a GitHub repository URL.
  2. Index: The system parses the codebase, creating a semantic "mental map" of the project structure, configuration, and documentation.
  3. Ask: You ask high-level questions like "How do I add a new endpoint using our specific auth wrapper?" or "Where are the database models defined?"
  4. Ground & Generate: Instead of guessing, RepoPilot retrieves specific file paths and code snippets as evidence. It then generates code that strictly mimics your existing patterns.
  5. Safe Refusal: If the evidence is missing, RepoPilot explicitly refuses to answer rather than hallucinating a wrong solution.

How we built it

We built RepoPilot using a modular RAG (Retrieval-Augmented Generation) architecture designed for zero-trust code generation:

  • Frontend: Built with Svelte for a high-performance, reactive user experience.
  • Ingestion Engine: A Python-based indexer that utilizes the GitHub API to crawl and parse file trees dynamically.
  • The Brain (RAG): We implemented a pipeline consisting of a Retriever (to fetch repo evidence), a Planner (to decompose complex tasks), and a Verifier (to cross-check generated code against the repo's style guide).
  • Grounding Logic: We developed specific prompt engineering layers that force the LLM to cite file paths and reject answers that cannot be supported by the repo's content.

Challenges we ran into

  • Context Management: Handling large codebases without exceeding token limits while maintaining context was difficult. We had to implement intelligent "chunking" strategies to ensure the AI understood the relationships between files.
  • Hallucination Control: Teaching an LLM to say "I don't know" is surprisingly hard. We spent significant time tuning the Verifier module to ensure the system prioritizes safe refusal over confident guessing.

Accomplishments that we're proud of

  • Strict Grounding: We successfully implemented a "Grounded-First" approach where the AI cites specific files (src/auth/utils.py) to back up its answers.
  • The Verifier Loop: Building a safety step that catches non-existent imports before showing the code to the user.

What we learned

We learned that context is king. A slightly less "smart" model with perfect access to the repository structure outperforms a superior model that is guessing blindly. We also learned that developers value consistency (matching existing code style) almost as much as correctness.

What's next for RepoPilot AI

  • CI/CD Integration: We plan to scale RepoPilot into a GitHub Bot that automatically reviews Pull Requests for architectural consistency.
  • Deep Dependency Graphing: improving the indexer to understand complex class hierarchies and function call graphs across files.

Built With

  • github-api
  • prompt-engineering
  • python
  • rag
  • semantic-search
  • static-analysis
  • svelte
  • vector-embeddings
Share this project:

Updates