The problem
Code you didn't write, arriving as a list of files.
- A change arrives as a flat list of files across one or more repos. Rebuilding the flow from that list — what triggers it, what runs next, where it ends — is the hard part.
- The usual way to learn a flow is to run it and debug it. For a multi-repo feature that means getting every project, its services, and its data working locally first.
How it works
Three steps. Nothing to run.
Pick a change
A git range or pull requests, across one or more repos — or work not yet committed.
trek main...HEAD ../gatewayYour agent builds the trek
Register
trek mcpwith your agent. It reads the change at its exact revisions and follows one example scenario from trigger to outcome.“Build a trek of this branch.”
Step through it
In Neovim or VS Code: next and previous in execution order, step over, into, and out, with the narration and call stack for each stop.
:Trek pay
What you get
Follow the flow, not the file list.
Whole flow, change highlighted
Unchanged code on the path is included and collapsed by default; changed code is where attention goes.
Across repos
One trek crosses repos and async boundaries — HTTP calls, queues, events — and each step names its repo.
Checkable
Every link from one step to the next cites the line that causes it. Predicted values are labeled as predicted; guessed links and risky spots are flagged.
Any agent
Your agent builds treks through
trek mcp, a standard MCP server.
What it is not
It shows the flow. The conclusions are yours.
- Not a summary or a review bot. You step through; nothing is concluded for you.
- Not a real debugger. Values and paths are predicted from reading code, not observed.
- Not tied to an editor, an agent, or a code host.
- Not a tool for review comments or approvals.
