I've been workig on a fun side project to hook up my record player to a Raspberry Pi and automatically identify the songs being played. We'll have a lot more on that once it's complete. The core of the project consists of two fairly distinct parts: a TypeScript/React based front end, and a Python based back end that is processing the audio. Typically, this type of split annoys me because I am required to run two separate management harnesses. With Claude Code and long running agent workflows, it's provided some interesting benefits. Because the two components are so distinct, it's a little easier to run tasks against each in parallel.
However, this process comes with it's own drawbacks. In this case, the underlying work was fairly complex (turns out identifying songs correctly from vinyl when queries are not 100% is more difficult than it looks) and the code turned into a bit of a mess.
The first time I ran npx fallow health against the kiosk, the composite score came back at 88. That was already worse than I'd assumed, but the per-file breakdown was the actual surprise: a single file — NowPlaying.tsx, the screen the project is named after — was 287 lines of code with a cyclomatic complexity of 60 and a CRAP score of 3660. The fallow report described it as "the worst file in the kiosk by every metric," which is the kind of one-line summary that's hard to argue with. That report is what this post is about: what fallow surfaced, what skylos covers on the Python side, how both tools wire into pre-commit and Claude Code as hooks, and the four refactor passes that pulled the score from 88 to 98.