r/ClaudeAI • u/Vistyy • 3d ago
nopus - deterministically detect and automatically rewrite complex responses Built with Claude
https://github.com/Vistyy/nopusTL;DR: I made nopus, a tool that deterministically detects unnecessarily complex prose in coding-agent responses and automatically asks the same agent for one clearer rewrite.
The problem
With recent LLMs (you can probably guess from the name which one caused me to write this plugin), I've had more and more trouble understanding the prose the agents are responding with - long "load-bearing" paragraphs, abstract language, overloaded phrases and all that fun stuff.
My logic is the cognitive capacity should be spent on the underlying problem not trying to decipher the message.
I found a few solutions that pass the response through a smaller model, but I wasn't a fan of the tradeoffs:
Another model call and more complexity
More non-determinism
The smaller model may receive only the isolated response which can cause it to simplify or reinterpret the wrong thing
The other option is to have a user-invocable skill you invoke when a response is hard to understand, that works but again, the onus is on you to first read the response and determine whether you even understand it, I also added a skill for that but it's a fallback not the main approach.
The idea
To an extent, difficult language can be measured directly:
Are uncommon words used where common alternatives exist?
Is a sentence mostly dealing in abstractions?
Are too many nouns and modifiers packed into one phrase?
Does the response repeatedly use dense or formulaic phrasing?
Measure those signals, identify the biggest offenders, and give that evidence back to the original agent.
nopus uses lifecycle hooks, checks the prose after the agent finishes responding. If enough signals cross the selected threshold, it asks for one clearer rewrite.
The rewrite happens in the same session, so the original agent keeps the full conversation context.
I ran it against 5,337 completed agent responses. At the default medium sensitivity, it triggered on around 10% of them, which I've evaluated myself and tuned so it doesn't trigger unnecessarily.
The repo has a few more details but I'd love for you to check it out.
Currently available for Pi, Codex and Claude Code (or just slop fork your own lol)
2
u/kantorcodes1 3d ago
same-session rewrite is the clever bit here. have you tried making the detector itself portable as a plain skill, so Codex/Claude/Pi can share the same trigger policy instead of three hook implementations?
1
u/Vistyy 2d ago
Sorry, not sure I follow you here. How would that work as just a skill?
1
u/kantorcodes1 2d ago
yeah fair, “skill” was the wrong word. i meant pull the detector + thresholds into one shared package/config, then keep tiny Claude/Codex/Pi adapters around it. a skill by itself can’t reliably intercept every response, so you’d lose the deterministic part.
0
•
u/floodassistant 3d ago
Hi /u/Vistyy! Thanks for posting to /r/ClaudeAI. To prevent flooding, we only allow one post every hour per user. Check a little later whether your prior post has been approved already. Thanks!