01 Copies, found and merged
Paste a GitHub repo. See every place your AI wrote the same code again, glowing on a map of your project. Merge the copies into one, and keep the merge only if your app still type checks.
cmonson66/nectarpay-crm · 159 files · createSupabaseFetch × 3
duplicate lines 59
02
The problem
AI coding tools copy instead of reuse. The copies drift, and bugs get fixed in one place only.
The agent cannot see the whole project at once, so it writes the same helper again. One app ends up with three ways to call the API and four ways to format a date, each slightly different, and nobody notices until a fix lands in one of them.
03
How it works
01
Any public GitHub link. Twins reads every TypeScript and JavaScript file and records a baseline: type errors, files checked, build.
02
Folders become rooms and files become cells. Every place the same code was written twice glows, with light drawn between the copies.
03
One click moves the code into one shared file and rewires every caller. Near copies go to the agent, which writes one shared version.
04
Every kept merge is checked against the baseline. Take the patch, or open a pull request with one commit per merge.
04
Twins said no
Terminal · Claude Code
> merge every copy of createSupabaseFetch ● twins · compare-twins ● twins · merge-twins edits: 3 files Done. The three clients now share one helper.
The map, same second
SAID NO · UNDONE AUTOMATICALLY
The check runs inside the merge action, not in the page. So it holds for you, for the built in agent, and for Claude Code over MCP. A merge that adds a single type error, or breaks a build that passed, is written back before anyone sees it.
05
From your agent
Connect once and your coding agent gets the same tools as this page: import a repo, read the map, compare copies, merge, undo and export. The map you have open updates live while it works.
$ npx @agent-native/core@latest connect https://twins.jdollar.site06
Questions
Two functions with the same structure after names and values are set aside. Exact copies have the same code and the same imports. Near copies have the same shape with small differences, and the agent handles those.
No. The server only downloads the source and parses it. Installs, type checks and builds run inside an isolated sandbox with the network cut off after install.
After a merge Twins type checks the whole app again. If there is even one error that was not in the baseline, or the build broke, the merge is written back to how it was and recorded as said no, with the exact errors.
No. The check lives inside the merge action itself. The page, the built in agent and Claude Code over MCP all call that same action, so the same rule applies to each of them.
Public TypeScript and JavaScript repos up to about 300 source files, with one tsconfig. Private repos and monorepos with many projects are not supported yet.
A patch you can apply with git, and soon a pull request on your repo. Each merge is listed with what moved and the lines removed.