跳到正文
DEV Community· Ricardo Zorzal Davila·· 2 小時前AI 評分59

Clúsia 推出開源 macOS PR 評審應用程式

Meet Clúsia: PR reviews for humans, with your own AI at your side

AI 導讀

Ricardo Zorzal Davila 推出 Clúsia,一款免費、以 Apache-2.0 開源並以 Rust 編寫的 macOS PR 評審應用程式。

正文

Most of my code reviews used to happen in a browser tab I'd squeeze in between meetings. Lately a lot of teams hand that job to a bot, and the bot leaves a pile of comments that mostly get resolved without being read.

I wanted somewhere calmer to read a change, with an AI I picked sitting next to me. It answers my questions and points at things, and I decide what goes on the PR.

That's Clúsia. It's a free macOS app, open source under Apache-2.0 and written in Rust, and I think it's ready for other people to try.

The Clúsia review screen: a syntax-highlighted diff with a thread, a draft comment and the draft panel

How a review works

You open a pull request and Clúsia checks it out in a local worktree. You comment on a line or a range, reply to threads and resolve them, and all of it stays in a draft on your machine. When you press Finalize review, the draft goes to GitHub as one review. Before that, nothing gets posted.

The draft also survives new pushes. If the author pushes while you're halfway through, your comments move to where their code went. If you saved a review and came back a few days later, your agent can read each comment against the new commits and suggest whether to keep it, move it, mark it obsolete or reword it. You go through the suggestions one by one, or accept all of them at once.

Your agent, on your account

Clúsia doesn't ship a model. It talks to the Claude Code or Codex you already use, with your own login, or to any program you write that speaks a small JSON-lines protocol. Your GitHub token never reaches the agent, and the agent never writes to git or GitHub. Publishing is your job.

When a review opens, the agent writes a summary, and then you can chat with it about the PR. It can read and search the worktree on its own. For anything else, like running cargo test or editing a file, a modal shows you the exact command, the reason the agent gave and a countdown. If you don't answer, the request is denied. Commands run in a sandbox by default, with no network and writes only inside the review's worktree.

A permission modal: the agent wants to run a command, with Deny, Allow for this review and Allow once

Security checks

When you open a review, your agent also looks at the change for security problems. Each finding comes with a severity (high, medium or low), the line it's about and sometimes a code suggestion, written as a review comment you can use. You add it to your draft, edit it first or dismiss it. A finding on a line the PR didn't touch becomes a general comment.

I was careful with the wording here. When nothing turns up, Clúsia says something like "Claude Code found no security issues in 7 files". It won't tell you the change is safe, because an agent that read the PR can't promise that, and I'd rather you keep reading.

The Security tab: three findings with high, medium and low badges, one with a code suggestion and one already in the draft

Audits, area by area

Next to Security there's an Audits tab. The agent goes through the change looking at correctness, concurrency, error handling, performance, tests, and docs and changelog, and each area gets its own findings. You can switch areas off, and you can add your own with a name and a short instruction (up to 500 characters), something like "check that every new endpoint has rate limiting".

If the agent didn't answer for an area, the tab says Not checked. I didn't want a silent "ok" there.

Each check runs in a session forked from the review's chat, so it already knows what the agent read and your chat stays free while it works. At most two checks run at the same time across all your reviews, because every one of them is a real turn on your account.

The Audits tab: six areas with counts, ok or Not checked, and a Concurrency finding with its proposed comment

Diagrams of the change

This is the part I've had the most fun building. The Diagrams tab asks your agent to explain the PR in up to eight diagrams, and it picks the kinds that fit the change: flow, dependency graph, sequence, entity-relationship, use cases, data flow, state machine or class diagram.

Clúsia validates every drawing and lays it out itself, so the arrows stay straight and readable. Click a box and you see its code at the commit it was drawn from, with the lines the PR added highlighted. From there you can comment on those lines and the comment goes straight into your draft. Each drawing is kept per commit, so after a new push you can step back through the versions and see what was added, changed or removed between them.

A sequence diagram drawn by the agent for a pull request

The last diagram in the list is a 3D one I call "Where the words live". The agent picks the words the change adds or touches, groups them into families and names a few use cases and three axes. Clúsia then finds every place those words appear in the repository, and the agent places each file and function on the axes. You can turn the map around, filter to only what the PR changed, and click any point to read the code and comment on it. It helps most when I'm reviewing code I didn't write and want to know what else depends on a name before I approve a rename.

The 3D keyword view: points for every place a word appears, coloured by family, with use-case clouds

The menu bar and the terminal

A popover in the menu bar shows the PRs waiting for you, saved reviews that went stale and a heatmap of your review activity. You get notifications for review requests, new commits on PRs you reviewed, replies, mentions and failing CI, and you can set quiet hours. If you'd rather stay in the terminal, there's a CLI too: clusia prs, clusia open owner/repo#123, clusia review publish.

The menu bar popover: activity heatmap, counters, search and pull request lists

Try it

You need a Mac, Apple silicon or Intel. The script builds Clúsia from source with Homebrew or Rust, never asks for sudo, and the first build takes about five minutes:

curl -fsSL https://raw.githubusercontent.com/rzorzal/clusia/main/install.sh | bash

If you'd rather read the script before running it (fair), download it first:

curl -fsSL https://raw.githubusercontent.com/rzorzal/clusia/main/install.sh -o install.sh
less install.sh
bash install.sh

The first run uses your gh login, asks where your clones live and finds the agent you have installed. Then open a PR from the tray or with clusia open owner/repo#123.

Come help

Clúsia is young, and what people tell me now will shape most of what comes next. If you review code every day, I'd really like to know whether this fits how you work.

The repo is github.com/rzorzal/clusia. A star helps other reviewers find it. Issues are welcome for anything that breaks, confuses you or is missing. If you want Clúsia to work with a model or tool it doesn't support yet, the harness protocol is short and there's a working example in Python.

And in the comments, tell me how you review PRs today. I'm curious what other people's setups look like.

The website, with screenshots, is at rzorzal.github.io/clusia.

來源:DEV Community · dev.to