Inspiration
Interns. That's what we are. We know exactly what it feels like. You write your first real feature. Not a tutorial. Not a homework problem. You test it. It works. You open your first pull request. The review comes back... three comments.
"We don't call the database from route handlers here." "This needs the retry wrapper — check how the payments service does it." "We stopped using this pattern in March. Look at the refactor in PR #281."
Your code ran, but was rejected so fast. It wasn't in the README. It wasn't in any style guide. It was inside a senior engineer's head earned over months of failures and refactors and late-night conversations you weren't in the room for.
The problem is never syntax. It's context.
We built CodeGuard so your next PR gets approved with no trouble.
What it does
Automated post-merge hook on git pull. Claude 4.5 Sonnet evaluates PR diffs. Substantive changes get 384-dim embeddings and metadata stored in MongoDB. Trivial changes are skipped.
VS Code extension. Coder agent writes unified diffs. Reviewer agent pulls related past PRs from MongoDB using cosine similarity and section filters to enforce precedents.
Call-graph visualizer. Features comparison of git refs or specific PRs, plus sequential navigation through PR history.
How we built it
AST diff extraction. Tree-sitter parses both the old and new versions of every changed Python file into full abstract syntax trees. We match functions across versions and build semantic diffs
Intent grounding. our algorithms gives CodeGuard deployment context, hard constraints, and section profiles. Every review is anchored to what actually matters for this repo, not generic best practices.
Two-tier LLM reasoning. OpenRouter handles all model calls. One call is your coding call which generates your code like any agent would. Then, your scanning call which contains all the context within your codebase, making sure your coding call is able to be published.
Codebase memory. We store important features, and mistakes you've made in your codebase so that our tools stay up-to-date with your coding specifics.
Challenges we ran into
Function matching. Git gives line diffs. We needed function diffs. Matching functions that moved, renamed, or split, hardest problem we faced. Most satisfying to solve. It's why CodeGuard reads like a mentor instead of a diff bot. Guideline conflicts. Teams evolve. Last month's best practice is today's anti-pattern. We built conflict detection using embedding similarity, new knowledge that contradicts old gets caught and resolved before it confuses anyone. Cold start. No merges means no guidelines. Our bootstrap replays git history but real repos are messy. Root commits, force-pushed branches, non-linear merges. More edge cases than we planned for. Worth every one.
Accomplishments that we're proud of
We ran bootstrap on a real repo and opened a PR with a known anti-pattern. The feedback was almost word-for-word what the senior engineer on that team would have said. It had learned their voice. When CodeGuard has nothing meaningful to say, it says nothing. Faking confidence would betray the intern's trust. Staying quiet felt more honest. When a hard constraint is violated, CodeGuard doesn't just block — it explains the rule, the reason, and what to do instead. That's mentorship. Not enforcement.
What we learned
Interns don't fail on syntax. They fail on context. Line-level tools can't close that gap. Function-level semantic understanding, grounded in team history, can. Teams are more consistent than they realize. CodeGuard surfaced patterns senior engineers didn't know they were enforcing. The feedback was never random. It just needed a tool to make it visible. Foundation models are the reasoning layer and not the product. CodeGuard is not trying to beat existing PR review bots at generic code review. Its differentiation is narrower and deeper. Most tools in this category help reviewers comment on code quality. CodeGuard helps a repository remember how it wants to be changed.
What's next for CodeGuard
Multi-language support. Auto-fix patches. Confidence scoring on guidelines. Cross-repo learning across an org. The intern who rewrote their PR at 2 AM will be a senior engineer one day. They'll have their own hard-won patterns and things they'll want to tell the next person. CodeGuard is how they give it away automatically, without being in every PR thread for the rest of their career. The repository learns. The team scales. The next person starts a little further ahe
Log in or sign up for Devpost to join the conversation.