Built on the Claude Agent SDK

The agent that
says skip.

Point it at your repo and a repo you admire. It reads both, tells you the few things actually worth copying, and implements the ones you approve — one commit each.

Verified run · neuroforge

6 worth doing 10 marked skip
Reference
tensorflow/playgroundApache-2.0 → port with attribution
Cost
$0.57 · 50 turns · 4.5 min
Rails
6/6 guard tests · 16/16 browser parity
repogap analyze — real session, trimmed
repogap analyze -r github.com/tensorflow/playground -C ./neuroforge \      -g "recruiter-impressive portfolio demo" Reference  · Cloning github.com/tensorflow/playground  ✓ Cloned to /tmp/repogap-reference  ✓ License: Apache-2.0 → port with attribution allowed Analysis  · Goal: recruiter-impressive portfolio demo  Read    src/nn.js  Read    reference/src/nn.ts  Grep    localStorage|history.pushState  Write   GAP_ANALYSIS.md | ID   | Gap                        | Effort | Benefit | Verdict       || G-03 | URL state serialization    | M      | High    | Adopt pattern || G-08 | JSDoc types for vanilla JS | S      | Low     | Adopt pattern |   50 turns · 269.0s · $0.5670 Done  ✓ Report written to neuroforge/GAP_ANALYSIS.md  · Review it, then apply items with: repogap apply G-03

The problem

Asking a model to compare two repos gives you a flattering list

"Look at how project X does it" is good advice and useless instructions.

The gap between admiring a codebase and knowing which three things to steal from it is a day of reading. The obvious fix is to ask a model. What comes back is an exhaustive, agreeable inventory of everything the reference has and you don't — padded to look thorough, ranked by nothing, with no idea what your project is for.

And if you then hand an agent write access, you get one enormous commit that touches forty files and nobody can review.

repogap is built around fixing both of those.

Problem 1

Output you can't trust. Nothing in the request gives the model permission to return less, so the list never shrinks — however small your project is.

Problem 2

Writes you can't review. One commit, forty files, some of it work you never asked for. Reviewing costs more than doing it yourself.

Answer 1

Score against a goal. Benefit is relative to what the repo is for, and anything below the bar is marked Skip with a reason.

Answer 2

One item, one commit. Planned, approved, implemented and verified individually — never batched.

What comes back

A report that skips more than it recommends

Ten of sixteen findings on the run above were Skips. That's the feature, not a shortfall.

Every finding is scored against a goal you supply. Pass -g "recruiter-impressive demo" and you get a different report than -g "production service". Anything that doesn't clear the bar gets a Skip and a one-line reason.

A recommendation you can act on is worth more than five you'll scroll past. Findings cite the reference file — often the lines — so you can check the model's work instead of taking its word for it.

6
worth doing
10
marked skip

G-03 — URL state serialization for shareability

What's missing
State lives in memory only. No way to bookmark a configuration or share a link to "spiral with 3 hidden layers, Adam, LR=0.01".
How the reference does it
src/state.ts lines 170–245 deserialize from window.location.hash on load, serialize all controls back to hash on change.
Benefit for my goal
High — "Here's the exact setup that solves spiral" becomes a clickable link in a presentation.
Verdict
Adopt pattern

Verbatim from GAP_ANALYSIS.md

Why it's safe to run

The rails are gates, not requests

Prompts are suggestions. A model that decides your instruction doesn't apply will act accordingly, and you find out afterwards — so the constraints that matter live in a canUseTool interceptor that runs before any tool executes.

Phase 1 · read-only

Analysis physically cannot write to your repo. Every Write or Edit whose path isn't GAP_ANALYSIS.md is denied before execution. Bash is narrowed to an allowlist — and checked per chained segment, so ls && npm install x is refused on the second segment. Outright destructive commands are caught earlier, on the raw string, however they're chained.

Before analysis · license

The reference's LICENSE is read first. MIT, Apache or BSD permits porting code with attribution flagged in the report. GPL, AGPL, or no license file at all flips the agent to patterns-only — describe the idea, never reproduce the code. That policy string goes into the system prompt, so the constraint is present for every judgment the model makes.

Phase 2 · one item, one commit

Nothing lands in a single unreviewable blob. Each item is planned first and waits for your go, then implemented alone, verified against your existing tests, and committed as gap(G-03): …. Writes outside the repo are blocked. git push, git reset --hard and npm publish are blocked in every phase. Nothing leaves your machine.

npm test — the guard suite
npm test

ok 1 phase 1 permits writing only the report file
ok 2 phase 1 narrows bash to read-only commands
ok 3 phase 1 inspects every segment of a chained command
ok 4 phase 2 confines writes to the target repo
ok 5 phase 2 allows committing but never pushing or rewriting history
ok 6 denials carry a reason the model can act on

# pass 6
# fail 0

Denials are logged, never silent:
  ⛔ Write — Phase 1 is read-only. The only writable file is GAP_ANALYSIS.md.
  ⛔ Bash  — recursive or forced delete
  ⛔ Bash  — pushing is the user's call, not the agent's

Measured, not estimated

One full run, start to finish

Six focus areas against a small repo. Every run prints its own turn count, duration and cost, so the bill is never a surprise.

50
turns
4.5 min
wall clock
$0.57
cost
10/16
marked skip

How it works

Two phases, one gate between them

Analysis and implementation are separated by a human decision, and the tooling enforces that separation rather than relying on the model to respect it.

  1. Phase 1 · read-only Clone, classify, analyse

    The reference is shallow-cloned to your temp directory — never inside the repo being analysed, so it can't end up in your git history. Its licence is classified into a policy, and that policy is injected into the system prompt before the agent reads a single file.

  2. Phase 1 · output Write the report, then correct it

    The agent writes GAP_ANALYSIS.md. The programme then rewrites the licence and date lines itself, because those are facts it already knows and shouldn't be trusting a model to carry.

  3. Gate You choose

    Nothing is implemented until you name item IDs. The report is a proposal, not a plan of record.

  4. Phase 2 · per item Plan → approve → implement → verify → commit

    Read-only tools during planning, write access only after you approve. It runs your existing tests, and stops to tell you if an item turns out bigger than its estimate rather than quietly expanding scope.

Try it

Two commands

Node 18+, git, and Claude Code authentication. Nothing else.

install & run
git clone https://github.com/charanreddy-27/repo-gap-analysis
cd repo-gap-analysis && npm install && npm run build && npm link

# read-only. writes GAP_ANALYSIS.md and nothing else.
repogap analyze -r https://github.com/owner/reference -g "your goal here"

# plan → approve → implement → verify → commit, per item.
repogap apply G-03 G-08

Contact

Have an idea? Let's talk.

Want to build something — or break something interesting? I'm around.

This is one project. The rest of them — and a few jet engines — live at charanreddy.dev.