Trail-Code: a code map plus team memory

Trail-Code gives your coding agent a map of your repo, plus a memory of what your team has already decided.

It's the new name of Graft, from Nanonets, now at trailhq on GitHub (10k stars, MIT). Two parts, both local. The first is a code map: trail init parses your repo with tree-sitter into every file and function and who calls whom. No model and no API key. The second is learnings: when a session works something out, or you correct how something is done, the agent saves it as a file. Learnings about the code are committed with the code.

The README claims the following. Across 162 runs of the same agent on the same tasks: 46% fewer tool calls, 42% fewer uncached input tokens and 60% less time. On 50 real SWE-bench Verified issues with Claude Sonnet 5: 33 solved with the map, 27 without. Those are the project's own numbers, so repeat the test on your repo.

The idea worth stealing even if you never install it: when someone corrects your agent, write the correction in a file the next session reads. That's the difference between an agent that starts from zero every morning and one that starts where you left off.

Install is npm install -g @trailhq/trail-code, then trail init in a repo. The README notes anonymous telemetry that you can opt out of.

Where do your agent's hard-won lessons live today: a file, or the chat history?

Sources

#ClaudeCode#CodingAgents#OpenSource#AI

New notes go out on LinkedIn first. Building something with AI? We can help.

Diagram card: Trail-Code: a code map plus team memory