Developer project · Understand an agent’s changes

Twain: keep the question beside the code change

When an agent hands over a batch of code, how does a human send a precise question back? This Git diff viewer connects file comparisons, line comments and an agent-readable CLI, with limits around local collaboration and changing revisions.

The v0.1.0 and v0.1.1 releases appeared October 14 and 16 UTC, respectively (October 15 and 17 in Beijing). On October 18 we checked the maker’s image, release assets and source revision 1f9150e5. Current source and released binaries are distinct; we did not run the GTK client or direct an agent through it.

Twain lists diff.rs, file_view.rs, main.rs, window.rs and README.md on the left; blue and green regions and connectors map changes between code panes.
The maker’s original image, retaining its proportions and text. HEAD~10 → HEAD~8 appears at the top. Inspect the file tree, change connectors and collapsed unchanged lines by enlarging it. No comment bubbles are shown, so it does not demonstrate a successful agent repair. · Open full-size image
In this articleContents4

中文

See the batch before discussing a line

An agent’s multi-file change first asks a human to understand the connections. Twain uses a Meld-like side-by-side view, arranging a Git diff’s files sequentially with a file tree for navigation. It can show changed regions, reveal surrounding unchanged text and search across modified files. A reviewer can locate a line and inspect its context.

Current source also accepts git-diff-style revision and path arguments, including revision comparisons and focused file paths. That extension comes from an October 18 commit; the October 16 v0.1.1 binary does not automatically acquire it. Choosing a release or building current source changes the available behavior.

Sources and further reading

中文

Attach the question to the lines it concerns

The maker’s entry point is small: select lines and press C or right-click to comment. An agent can read threads with twain comment list --json and answer with reply, letting the person return to the same location. A question about a missing null case can stay beside the relevant code. This illustrates a workflow; it is not a repair we performed.

The CLI supports author filters, unresolved threads and watch for changes. Line numbers start at one and normally refer to working-tree files, rather than old-side diff numbers; removed lines use --old. An agent should read the installed version’s twain comment --help before acting on a number copied from an older screenshot.

Sources and further reading
  • Twain · Pinned source and READMEMaker’s code · GPL-3.0Pinned at 1f9150e5281fc0c5659f7380f3a11f3cbadf1e09. README claims are checked against source, without attributing later main-branch changes to older binaries.
  • Comment commands and line conventionsSource code · input/output contractlist/add/reply/resolve/watch; lines are one-based and normally refer to working-tree files, with --old for removed lines.
  • Comment storage, threads and line movementSource code · local stateSQLite keys include repository root, file path and ID. The GUI and CLI share local state, rather than providing a remote review service.

中文

Comments can move with code and still lose context

Comments and replies live in local SQLite, identified by repository root, relative path and ID. Windows and CLI processes share that state. The code retains the commented text to locate it after changes, reporting outdated when the relevant lines disappear or no longer match. A revision can remove the very context yesterday’s question concerned.

Resolving a thread marks its state; it does not prove correctness. Sharing between local processes also does not mean comments travel in Git commits or sync to GitHub or another machine. A person still needs to inspect the latest diff, check that the question was answered and run appropriate project checks. A model reply, a thread status and software behavior are separate observations.

Sources and further reading

中文

It supplies a review surface; less rework still needs evidence

Published assets target Linux x86_64 and aarch64, including Flatpak. Building requires GTK 4, GtkSourceView 5 and libadwaita, and the project uses GPL-3.0. The README lists merging, three-way comparison, other version-control systems and direct file editing as absent. This is not a complete IDE or automatic reviewer.

Our earlier article on Anthropic’s workplace research asks where review work goes when generation gets faster. Twain offers a concrete project response: let people send judgment and questions back to an exact location. A full exchange on a real project, recovery from outdated comments and evidence on review time and rework are still needed to establish that it reduces the burden.

Sources and further reading
  • Twain · Pinned source and READMEMaker’s code · GPL-3.0Pinned at 1f9150e5281fc0c5659f7380f3a11f3cbadf1e09. README claims are checked against source, without attributing later main-branch changes to older binaries.
  • v0.1.1 · Actual release assetsRelease record · October 16, 2026 UTCLinux x86_64 and aarch64 binaries and Flatpak bundles; source availability does not establish a ready-made macOS or Windows app.
  • Maker’s page and original interface imageMaker’s presentation · not our testThe screenshot shows two Git revisions; it does not document a completed human-agent comment exchange.