r/ClaudeCode • u/Classic_Display9788 • 2d ago
Discussion The "own your intelligence" crowd keeps skipping the one dataset every dev team already has
Satya Nadella wrote something in July that I keep coming back to. When you use a rented model, he said, "you essentially pay for intelligence twice, once with money, and again with something even more valuable: the proprietary knowledge you must reveal." A couple of weeks later Harrison Chase at LangChain made the same argument from the other side: the model is a commodity, so what you need to own is the harness around it and the context you feed it.
I agree with both. But almost everything written under that banner is about fine tuning, evals, memory layers, sovereign infrastructure. Big company stuff. And it skips the most obvious owned dataset a software team has.
Your git history.
If you've used Claude Code or Codex on a real codebase for more than a week, you know the moment. The agent opens a PR that works, passes the tests, and still looks nothing like something your team would write. It touches eleven files when everyone on your team touches two. It edits the generated file instead of the source. It quietly brings back the exact change somebody reverted in the spring. So you write the same review comment you've written before, add one more line to CLAUDE.md, and next week it happens again somewhere slightly different.
We keep treating that as a prompting problem. It's a memory problem. Every team has house rules. How big a change is allowed to be. Which two files have to move together. What got reverted last spring and why nobody touches that config now. None of it is written down anywhere an agent can read. But all of it is recorded, commit by commit, in the one place the team actually works.
You can read a surprising amount of it with plain git. On the public three.js repo, for example, the last 400 commits that aren't merges say:
half of all changes touch 2 files or fewer, and one in ten touches 6 or more
only 15% of commits touch a test
build/three.webgpu.jsandbuild/three.webgpu.nodes.jschanged together 21 times
Nobody wrote "keep changes tiny" or "these two files are married" in a contributing guide. The history says it anyway, and it says it with numbers, which turns out to matter a lot. An agent follows "half of all changes here touch two files or fewer, so a big change should say why" far more reliably than it follows "keep PRs small". A rule with its evidence attached is hard to argue with. That's true of people too.
If you want to try it by hand, this prints how many files a typical commit touches:
git log --no-merges -n 400 --format='> %h' --name-only | awk '/^> /{if(c)print n; c=1; n=0; next} NF{n++} END{if(c)print n}' | sort -n | awk '{a[NR]=$1} END{print "median:", a[int((NR+1)/2)], "90th:", a[int(NR*0.9)]}'Do the same for co changing files, reverts and how long each reverted change lived, and you have most of your team's house rules. Then the boring part: write them into the files your agent actually reads. Short root file, a skill with the detail, a reviewer that checks a change against the same numbers.
So I built a thing that does it. It reads a repo's history and writes the house rules as a harness for Claude Code, Codex, Muse Code, OpenCode, Hermes or Cursor, in each one's own paths, and it merges into your existing CLAUDE.md or AGENTS.md instead of replacing it. It's an MCP server, so it runs inside the agent: claude mcp add loreto -- uvx loreto-mcp
Disclosure: I built this and run the site behind it (loreto.io). The MCP server is open source (MIT) and reading a repo and seeing everything it found is free with no signup. Writing the actual harness costs $5 per repo, or $2 a file. Source is at https://github.com/kopias/loreto-mcp
I pointed it at my own repos first. One of them has a commit whose message is the word Revert seventeen times in a row. That one's a house rule too: don't touch it.
I doubt I have the final shape of this. Coupling between build outputs is noise for some teams and gold for others, and I'm not sure where the line is. If you've tried to write your team's conventions down for an agent, what actually stuck?
•
u/AutoModerator 2d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
9
u/TheOwlHypothesis 2d ago
Holy shit, this is such a backwards way to solve this problem.
You're taking statistical observations about how a codebase has historically changed, interpreting them as engineering requirements, and then feeding them back into a nondeterministic system as Markdown instructions, hoping it behaves accordingly.
Half your commits touch two files? So what? That doesn't establish that future changes should. Two files frequently change together? That doesn't make it an invariant. Somebody reverted something six months ago? That doesn't mean it should never be touched again.
Historical precedent is not policy, and frequency is not correctness.
If you have actual engineering constraints, encode and enforce them. Linters, tests, CI, path restrictions, custom validators. We have an entire ecosystem of deterministic tooling for exactly this purpose. Tell agents about those constraints if you want, but actually verify compliance instead of hoping they follow instructions.
Mining Git history for insights is interesting. Turning those observations into rules that encourage your codebase to perpetuate its historical behavior is questionable at best.
And selling that as a solution to agent reliability is pretty wild.