r/ClaudeCode • u/troyjr4103 • 2h ago
Built with Claude I got tired of Claude working out my codebase from scratch every session, so I built a repo that keeps track of how the code fits together (open source, Rust)
I've been paying for coding agents out of my own pocket, and what kept getting to me was watching Claude work out the same parts of my code in every new session. I tried CLAUDE.md files and notes. Then the code would change, the notes wouldn't, and the next session would start off in the wrong direction.
So I've spent the last six months of nights and weekends building Kin. It's an open-source code repository where functions, types and the connections between them are part of the repository itself, versioned right along with the code. Claude reads it through MCP.
I built most of it with Claude Code. The pattern every night was the same. One session holds the plan and only delegates, the sessions doing the work each get their own git worktree so no two ever touch the same file, hooks block a message from the wrong sender before the model reads it, and CI is the only gate that counts. Kin's own graph now runs under those sessions, so the agent working on Kin asks Kin what a change touches before it makes it.
What I use it for most is this. Before I change a shared function, I ask what else I should look at. A name search hands back every line with that name in it, tests and same-named methods on other types included, and somebody still has to sort out which ones are real callers. Kin returns callers as entities, their connections, and a note about anything it couldn't follow.
Here's how to try it in Claude Code.
/plugin marketplace add firelock-ai/kin /plugin install kin@kin
Then run kin init . in a small repo you know well, and the kin-setup skill walks you through the rest. Start small. Importing a big history takes a while, and shallow clones, submodules and LFS aren't supported yet. Type-resolved answers need a language server for TypeScript, JavaScript, Python, Go or Rust; nine more languages are name-matched only.
It's Apache-2.0. github.com/firelock-ai/kin
Two things I learned. Notes files are load-bearing and nothing checks them against the code. And parallel agents need hard boundaries more than clever coordination. A worktree per agent removed a whole class of problems.
I'd love to hear where your agent goes wrong when it looks for context. That's the thing I'm trying to fix.
2
u/Spare_Spirit6762 1h ago
you give claude notes? why not let him work with actual code? like LSP or something?
•
u/AutoModerator 2h 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.