Blog
Writing
Notes on code quality, static analysis, and keeping AI-generated codebases maintainable.
- 日本語
AIが書いたコードを静的解析でレビューする——何を測り、どう読むか
複雑度、デッドコード、重複、依存関係。静的解析の指標ごとに、何を調べ、結果から何を判断すればよいのかを解説します。数値を下げることではなく、レビューで確かめるべき場所を見つけるための使い方です。
Reviewing AI-Written Code with Static Analysis: What to Measure and How to Read It
Complexity, dead code, duplication, and dependencies: what each analysis tells you, how to read the results, and what to check next. Use metrics to guide code review, not just to chase a better score.
How Tools Find Circular Imports
Finding a loop in a graph is a solved problem. Deciding which imports belong in the graph is not. What we learned when our own dependency checker got three popular Python projects wrong.
How Tools Find Duplicated Code
Copy-pasted code is the easy case. Renamed, reshuffled and slightly edited copies are the hard one. How duplicate-code detectors work, in plain language, with real examples from our own code and from projects we admire.
Keep Your Codebase Healthy for AI Coding Agents: A Polyscan Setup Guide
Install the Polyscan GitHub App, configure .github/polyscan.yml, and read your first report. Free on public repositories.
Ruff, mypy, pytest, and then what?
Structural quality in the age of AI-written Python. What the standard toolchain checks, what it does not, and what a real agent-written repository looks like when you measure it.
- 日本語
コードレビューがボトルネックになった
コーディングエージェントを使うと、パッチを書く時間は短くなりますが、レビューする時間は短くなりません。レビューのうち「コードベース全体への影響を見る」部分は機械に任せないと、レビューが回らなくなります。
Review Is the Bottleneck Now
Coding agents made writing a patch cheap and left reading one exactly as expensive as before. The half of code review that guards the shape of the codebase used to be done mostly before review, by the author. Agents don't do it, and reviewers no longer have the time. Here is what I think has to happen to it.
13 of 14 Models Write Messier Code Than the Human Who Fixed the Same Bug
We scored 14 SWE-bench submissions for maintainability against the commit a human wrote to fix the same bug. Thirteen of the fourteen left the code messier.
What Your Coding Agent Can't See
AI agents score perfectly on the code quality metrics they can perceive, and badly on the ones they can't. The fix isn't better prompting — it's giving them a structural feedback loop.