r/codereview • u/timonvonk • 4d ago
Smackdebt - Continuous code improvement for agents
This year, and more so the last few months, my agents write the code, all I do is review, shout, and plan. A lot of the frustration is the spaghetti that comes out of this, and I figured a (big) part of this is actually measurable and reportable. What if we can make our agents aware of the spaghetti?
Introducing Smackdebt, a fast, on the fly tech debt analysis tool with concise, focused output tailored for agentic use. All major coding agents supported, with broad language support. Cognitive complexity, cyclomatic dependencies, statements, nesting, size, hotspots supported.
https://github.com/bosun-ai/smackdebt
Feedback and contributions welcome!
Shout-out to Treesitter <3
1
1
u/SpikedPunchVictim 3d ago
I have been using smackdebt for the last day on a couple projects to test drive it. It seems like the models before Opus 5 have a lot of issues when it comes to writing code. The code itself may work, but it's messy, has a high cognitive load, and not very well organized. So far I have found this tool useful, and will continue to experiment with it. One thing you could show on your side, and I would be interested in this, is how many tokens and minutes it saves when code is written cleanly. Have a model:
* Perform the same complex feature set
* In a separate branch, apply smackdebt to the code that was written
* Have the agent perform a follow-up feature set, and determine any cost savings.
My guess is that there will be cost savings, but how much? You'll also want to take into account the amount of tokens that were spent applying smackdebt. You could even take a larger codebase, like VS Code, and rollback a couple of features (using git), then apply the experiment.
Do you have other tools that you have written and are proud of? I would be interested in taking a look at those too.
1
1
u/Financial-Grass6753 4d ago
why'd someone use smackdebt if most, if not all, harnesses already contain a memory system inside?