AI Second - managing code complexity
Having put a decent amount of agent coding hours across multiple projects I have found that one very useful guardrail is having cyclomatic complexity testing (e.g. gocyclo). This forces the agent to abstract and keep things simple and resulted in much more readable code that’s easier to reason about for both myself and agents.