init-co-jp/diff-tour

Developer Tools

Turns a git diff into a step-by-step guided tour written by an LLM, for engineers who need to understand why a change was made.

296
22
Go
MIT
14 days old

If you have to review or inherit a change whose intent is not obvious from the diff, tour is worth a look. It is a young, single-purpose tool with a clear workflow and an honest cost story, but it depends on an already-configured coding CLI and produces a 2–5 minute, LLM-written artifact rather than deterministic output.

The problem

You often want to understand a change before reviewing it: what it is for, where the risky parts are, and which surrounding files matter even though they were not touched. Reading the raw diff does not answer those questions, because the diff only shows lines, not intent or context. Opening the files and reconstructing the reasoning by hand is slow, especially for code written by someone else or by an AI. diff-tour changes that step: instead of reading the diff start to finish, you pick a branch, commit or range, and step through an ordered tour of the change with → and ←. The output is a sequence of screens that explains purpose, points at files to jump to, and poses review questions.

What's different

The mechanism is worth understanding because it shapes both the benefit and the cost. tour archives the base and head commits, captures the diff and commit messages, and hands that directory to one of several coding CLIs running with read-only permissions. The LLM is asked to write the tour as JSON. The tool then validates every file and line the JSON references and asks the model to fix mismatches up to twice. Code shown on screen is read from git at the correct commit, never copied from the model's reply, and steps can show diagrams, schemas and labeled "Example" code that is not in the repository. That validation and git-sourced display are the real differentiator: they reduce the chance of a tour pointing at the wrong line.

The trade-off is that the substance of the tour is LLM-generated, and the README is explicit that it takes 2 to 5 minutes because the model reads files around the change, not just the diff. A tour of about 250 lines was quoted at roughly $1.00–$1.50 at API prices on a Claude Code plan. Saved tours reopen for free and can be shared as JSON, but reopening a saved tour does not re-verify it against later commits.

Who should try it

Good fit: a reviewer facing a new feature, a refactor, or AI-written code they will now own, where the "why" is not visible in the diff. It is also useful for onboarding onto an unfamiliar branch and for producing a shareable explanation for a teammate. Poor fit: a one-line fix, where the README itself says reading the diff is faster, and teams that cannot send repository files to an external LLM. The documented setup assumes git plus a signed-in Claude Code, Codex, Gemini, OpenCode 2 or Copilot CLI; there is no documented offline or local-model path, so that requirement decides a lot of adoption.

Requirements and limitations

The hard dependency is git and one of the listed coding CLIs, installed and signed in; the README gives per-CLI version checks and sign-in commands. The LLM receives tracked files at both commits, the diff, commit messages, and the prompt, plus untracked non-ignored files when touring uncommitted changes. That is a real data-handling decision, not a footnote. Installation is available via a curl script, go install (Go 1.27+), or a PowerShell route, but Windows is explicitly not tested yet. Ongoing upkeep means keeping the chosen CLI authenticated and re-touring after a branch moves; saved tour files are a snapshot, not a live view. The README labels the tour format and screens as early and subject to change, and schema rendering currently covers SQLite migrations only.

HotRepo's take

HotRepo recorded 296 total stars and a #15 position on its NEW-REPOSITORY board on 2026-10-24, with no earlier history; that is a snapshot of a 14-day-old repo, not a growth series, so persistence cannot be judged. Before adopting, verify the data-handling section against your own repository's sensitivity, since the whole workflow rests on sending tracked files to the chosen CLI.

Project links: README, example tour JSON.

Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.