Repowise on a Real Codebase: Exploring Devsy
In the first post I set up Repowise on a four-file Python project. It worked, but there wasn’t much for it to find. This time I pointed it at Devsy: about 2,800 code files and 430,000 lines, with a Go CLI and agent, a TypeScript/Svelte desktop app, and a docs site.
I didn’t have a change in mind, so this post is exploration: what Repowise sets up for Claude Code, what its MCP tools say about Devsy, and where I checked its answers and found them right or wrong.
What init sets up for Claude Code
repowise init does more than build the index. It also sets Claude Code up to use it, in two places.
A CLAUDE.md in the repo’s .claude/ folder. It tells the agent to ask Repowise before grepping or opening files, and lists which tool to call when:
- Before a rename:
get_context(targets=["<symbol>"], include=["references"]) - Before editing a file:
get_risk, and before changing how it works:get_why - Before finishing:
get_change_risk(revspec="<base>..HEAD")
This file isn’t committed. I keep .claude out of git, so it only exists on my machine. That tripped me up: Claude Code labels the file as “project instructions, checked into the codebase”, so when I asked why the agent kept calling get_change_risk, it told me “the project’s CLAUDE.md asks for it”. It was Repowise’s setup that asked, not the Devsy project.
Hooks in ~/.claude/settings.json. These are global, so they run in every project, not just this one:
| When | What it runs |
|---|---|
| Session start | repowise-augment: “Loading repowise context…” |
| After Read, Edit, Write, Grep (and when they fail) | repowise-augment: adds context about the file to the result |
| Before a shell command | repowise-rewrite: “Distilling command output…”, trims noisy test and build output |
After git commit, pull, merge, rebase, cherry-pick |
repowise-augment: “Checking for a decision to record…” |
None of the hooks call get_change_risk or get_risk. Those happen only because the CLAUDE.md asks for them, so nothing enforces them.
Check .repowise/ is actually ignored
In the first post I said the .repowise/ folder is gitignored. In Devsy it wasn’t. The only thing in .repowise/.gitignore is one key file, and nothing in Devsy’s own .gitignore covered the folder. So git status showed 94 untracked files of Repowise’s index, including a 6 MB SQLite database and a LanceDB folder. One git add -A and they’d be in a commit.
Repowise’s own Review page made it obvious. It said my uncommitted change was 98 files. Four of those were mine, and the rest were the index.
Devsy’s maintainer doesn’t use Repowise, so the fix doesn’t belong in Devsy’s .gitignore. Git has a local-only version of that file, .git/info/exclude, which works the same way but is never committed:
echo '.repowise/' >> .git/info/exclude
I moved .claude there too, along with my other editor config. If your whole team uses Repowise, put .repowise/ in .gitignore instead.
The overview
The overview gives Devsy a 9.3 out of 10. That sounds great, but the more useful number is right under it: the hotspots (the files that change most) average 8.3. Those are the files where work actually happens.
Two things on this page I didn’t expect:
- Score validation, 16/20. Repowise checks its own scores against history. Of the 20 files it rates worst, 16 had a bug fix in the last six months, against a 14% base rate. That’s the first sign the score means something on this codebase.
- “78 of 81 components rest on one person.” Nearly every part of Devsy has a single main author, and Repowise suggests pairing a second reviewer on them.
The MCP tool get_overview returns the same thing to the agent: the modules, entry points, riskiest files by git history, and a short list of what to do next.
Code health: one function is a fifth of the problem
Further down the page is the code health map. Each folder is a circle sized by lines of code and colored by score, with the files inside it as smaller circles. On Devsy almost everything is green. The red and orange are nearly all in one place, desktop/src, which scores 7.1 while pkg and cmd score 9.4. All five of the lowest-scoring files in the side panel are in the desktop app.
The worst file is desktop/src/main/ipc.ts at 1.88. Almost all of that is one function. registerIpcHandlers runs from line 408 to line 3101 and has a cyclomatic complexity (the number of separate paths through the code) of 172. It changed in 54 commits. By Repowise’s count, that one file is 20.8% of the whole repo’s health gap.
The part I liked is what get_health hands the agent with each suggestion. Here it is for that function, trimmed:
{
"title": "Break up registerIpcHandlers (CCN 172, 1,462 lines)",
"first_step": {
"action": "Start with lines 2840-2854, where it nests deepest: return early or move it into a helper"
},
"verify": {
"command": "npm --prefix desktop test -- src/main/__tests__/ipc-provider-icon.test.ts src/main/__tests__/ipc-provider-jobs.test.ts ..."
}
}
That’s a place to start, and the exact tests that cover the code being changed. An agent left on its own would run the whole suite, or worse, guess.
The Refactoring page narrows 28 opportunities down to two “worth doing” and says which steps are mechanical enough to hand to an agent as written (14 of 36) and which need a person’s judgment first.
Dead code: trust the tiers
get_dead_code found 172 things: 161 exports nothing uses, and 11 files nothing imports. It splits them by confidence, and 12 high-confidence findings (111 lines) are marked safe to delete.
I checked them against the code.
High confidence: right. GetMajorVersion, GetMinorVersion and the rest of the version helpers, NewSSHPassClient, GetDevsyToken and presentSecretProtectionError each appear only where they’re defined.
Medium confidence, unused files: mostly wrong. Repowise says these desktop files have no importers:
| File | Files that import it |
|---|---|
lib/router.ts |
29 |
lib/utils/error.ts |
16 |
lib/stores/updates.svelte.ts |
8 |
lib/analytics.ts |
5 |
lib/ipc/events.ts |
3 |
lib/stores/terminal-instances.ts |
3 |
lib/utils/provider-icon-loader.ts |
2 |
The desktop app imports them through SvelteKit’s $lib/ alias (import ... from "$lib/ipc/events.js"), and Repowise doesn’t follow it. One medium-tier file really is unused: WorkspaceCard.svelte has no importers at all.
So the tiers do their job. Repowise rates these 40%, never marks them safe to delete, and says in every response that “an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.” But “Propose cleanup” and “Copy prompt for these 11” are one click away. An agent that took the whole list at face value would break the desktop app.
The tools an agent uses while writing code
Health and dead code are for planning. Most of the MCP tools are for the middle of a task, when the agent is about to change something.
Before editing: get_risk
I asked about pkg/client/clientimplementation/workspace_client.go, which the overview listed as one of the riskiest files:
10 bug fixes in 6 months, last 0d before the indexed commit (bug magnet),
churn hotspot, top 1% (stable), 32 direct dependents, 25 co-change partners,
one author wrote 82% of current lines
Its health score is 9. The structure is fine. The risk is all history: it keeps getting fixed, 32 files depend on it, and it has changed together with proxy_client.go 33 times. That’s exactly what an agent can’t see by reading the file, and what it should know before “just fixing one thing” there.
Before a rename or delete: get_context
get_context(targets=["pkg/version/version.go::GetMajorVersion"], include=["references"])
"references": {
"complete": true,
"sites_total": 1,
"files": { "pkg/version/version.go": { "definition": [13] } }
}
complete: true means that’s every reference, so there’s nothing left to grep for. Here the only site is the definition, which agrees with the dead code report.
Asking how something works: get_answer
I asked “How does devsy decide which provider to use when creating a workspace?” The answer quoted FindProvider from pkg/workspace/provider.go, explained that providers are looked up by name from the loaded config, and mentioned devsy provider use <name>.
It rated itself medium confidence and said why: “Retrieval was ambiguous (no single dominant page)”. It had also pulled in pkg/pool/provider/provider.go, which is a different kind of provider. Its own excerpt says so: “the pool’s runtime backend, not a Devsy workspace provider”. So the answer pointed at the right code but told me to check it, and checking was the right call.
Before committing: get_change_risk
I ran it on the most recent commit, which added a provider dependency catalog:
- Verdict: clear. No new health problems in the five Go files it analyzed.
- Tests: run them all. The commit added
pkg/dependencies/catalog/v1.json, and no test reaches it, so Repowise can’t narrow the list. - Size: bigger than 89% of recent commits. That’s size, not danger, and the output says so.
- Other branches: an older feature branch edits five of the same files. If that branch is still alive, a merge conflict is coming.
The useful findings were the untested JSON file and the overlapping branch. Neither is something the agent would have looked for.
The Review page shows the same for uncommitted work, plus who to ask:
Does it catch copied code?
An agent mistake I see a lot is writing a second copy of a helper that already exists. The CLAUDE.md tells the agent to run get_change_risk before finishing, so I wanted to know if that check would catch it.
I made a worktree of Devsy and planted two copies, the way an agent would write them:
- Go:
pkg/envfilehas an unexportedreadEnvFile. Instead of exporting it, I copied it intopkg/agent/container_detect.goasreadContainerEnvFile, along with the struct it fills. - TypeScript: I copied
deriveWorkspaceIdfromworkspace-id.tsintoworkspaceLabel.tsassuggestedWorkspaceLabel, line for line, instead of importing it.
In both cases I left the original file alone, which is how a real copy looks.
get_change_risk: clear
"directive": {
"status": "clear_in_analyzed_scope",
"headline": "No supported new findings surfaced in the analyzed scope. Health of the changed code holds at 10.00."
}
Nothing introduced, nothing worse, and both files still score 10.00. The Review page’s health check agrees: pass, with no new findings.
repowise health --score: TypeScript yes, Go no
This command scores files as they are on disk. It compares them against the clone data in the index, so it can see code copied from files you didn’t change.
$ repowise health --score desktop/src/renderer/src/lib/utils/workspaceLabel.ts --against HEAD
│ desktop/src/renderer/src/lib/utils/workspaceLabel.ts │ 10.00 │ 9.67 │ -0.33 │
The TypeScript copy took the file from 10.00 to 9.67. The Go copy didn’t move it:
$ repowise health --score pkg/agent/container_detect.go --against HEAD
│ pkg/agent/container_detect.go │ 10.00 │ 10.00 │ +0.00 │
Even where the score drops, the output doesn’t say why. A drop of 0.33 could be anything.
Why
Claude read through the Repowise source to find out. The clone detector works fine. Asked directly, it finds both copies:
dry_violation medium: 31% of file duplicated in other files; worst clone shares 26 lines with desktop/src/renderer/src/lib/utils/workspace-id.ts
dry_violation low: 17% of file duplicated in other files; worst clone shares 19 lines with pkg/envfile/envfile.go
The finding is there, but three decisions keep it out of sight:
- The duplication finding is hidden.
dry_violationis marked hidden in Repowise’s finding registry, with the reason “Flags duplicated import blocks and data literals as design duplication.”get_change_riskdrops hidden finding types before comparing, so it can never report one as new. - It only counts toward the score in TypeScript. A blind study of 64 repositories judged 7 of 64 duplication findings worth acting on, and only in TypeScript did they predict bugs (#5426). In Go it’s advisory and costs nothing.
get_change_riskonly reads the changed files. It never sees the original that was copied, so even the TypeScript copy scores 10.00 there.--scorereads the index’s clone data, which is why it saw the copy (#4499).
Those are reasonable calls for a score that has to predict bugs. The result is that the check the agent is told to run won’t flag a copied helper. I searched the Repowise issues and didn’t find anyone reporting this. The closest is #4176, which fixed the same blind spot for --score. I opened #6653 asking for a way to ask “does this change duplicate code anywhere else in the repo?”, separate from the score.
Finding it anyway
The finding isn’t gone, it’s just hidden. repowise health --format json lists hidden findings too, marked "withheld": true. I ran it on main and again with --recompute in the worktree, which analyses the files as they are on disk. Then I kept the duplication findings that were new and touched a changed file. That reported both copies, Go included, and found nothing on an unchanged branch. It takes about a minute, because --recompute re-analyses the whole repo, and the agent has to run it from the command line.
It helps to know what counts as a copy. The detector compares code tokens with names and values swapped for placeholders, so my Go copy still matched after I renamed the function and struct. It doesn’t use embeddings, so a rewrite of the same logic with the statements reordered or a different loop wouldn’t be caught.
Tests
Devsy has no coverage report loaded, so Repowise works out from the dependency graph which files a test reaches: 1,261 of 1,497. It’s careful about what that means: “Reaching is not executing either, so ‘a test reaches this’ is safe to trust and ‘this much is tested’ is something it cannot tell you.” Only one file is both weak and unreached.
What I took away
- The history signals are the part an agent can’t get by itself. Reading
workspace_client.gowon’t tell you it’s had 10 bug fixes in six months.get_riskwill. - The answers come with their own warnings, and they’re accurate. Medium-confidence answers really were muddled, and medium-confidence dead code really was wrong. The high-confidence findings I checked were right.
- Don’t count on it to catch copied code.
get_change_riskpassed two planted copies. The hidden finding is inhealth --recompute --format json, if you diff it against main yourself. - The agent instructions live in a file that isn’t committed, and the hooks are global. Know they’re there, so you know why the agent is calling these tools.
- Check that git is ignoring
.repowise/. Use.git/info/excludeif you’re the only one using Repowise.
Claude Code and Opus 5.5 ran the Repowise tools, checked their findings against the Devsy source, took the screenshots and drafted this post.
Copyright 2026 Wendy Smoak - This post first appeared on wsmoak.net and is CC BY-NC licensed.









