Video wird geladen...
Video konnte nicht geladen werden
> "Agents produce overly verbose code that's hard to read and understand" Try setting a Cognitive Complexity rule in Biome. This metric is specifically designed to test how hard the code is to understand
110,420 Aufrufe • vor 16 Tagen •via X (Twitter)
13 Kommentare

Paper on cognitive complexity

isn't this cyclomatic complexity?

Nope

it looks like it is but it's count differently

interesting might go well with my /ponytail & knip workflow

a diff of what actually changed would have been nice

Cool. Does it do well?

Worth knowing maxAllowedComplexity defaults to 15, so pinning it lower in the agent's lint step makes the feedback land right away.

Metrics, when they are optimised for, always have side-effects that make code worse.

why isn’t it on automatically?

Biome is awesome Ai agents (and people too) will write good code if you enforce it I would love to see biome have some rules that wnforce stricter quality for AI agents Personally, I already create rules for layers and naming conventions - a lot of ideas from archunit

I like

"fix lint" and it just turns the lint off

