Show HN: Claktor – a refactoring CLI for coding agents
How is it scored? When exploring how to try to roughly judge how much logic there is in a program, the first approach is LOC. However that is just a proxy as lines can have lots of meat and can be gamed. What we arrived to are 'normalized tokens' which is a parsing of a normalized program by an LLM tokenizer. This neatly fits into then cost of reading the modified file by AI Agents. The more normalized tokens we reduce while preserving behaviour, the more deduplicated to codebase is and cheaper it is to read, extend, test and maintain by AI Agents. (the normalization is subject to some guards like: removing types does not reduce tokens)
Is this developed to the extent that it can be? By all means no! It already is very effective however as it greedily ranks everything through the codebase so AI Agents can remove around 3 to 10 times more for the same cost depending on the repo.
Please try it out and let me know how it goes! Currently works with TS,JS,Rust and Python
There are no comments yet.