Data on AI code and "code maintainability metrics" show negative correlation

Running into this exact problem while using coding agents on a performance-sensitive Julia package, two categories of checks turned out to matter much more for agents than they do for humans:

  1. Structural & symbol discovery (preventing the copy-paste / duplication tax): Agents duplicate helpers and bypass multiple dispatch largely because they navigate by blind regex grep and only see small file slices. Giving the agent an AST knowledge graph (graphify over tree-sitter-julia) and a Universal Ctags symbol table (ctags) so it queries existing abstract types, structs, and methods before writing code cuts down on reinvented functions.
  2. Millisecond edit-time AST gates + semantic runtime gates: JET.jl and Aqua.jl are essential, but agents also need fast (~10ms) structural checks they can run on every edit to catch LLM-specific Julia habits—like putting @allocated at top level in tests (where it measures global boxing), defining overlapping ::Real and where {T <: Real} methods that overwrite each other during precompilation, or leaving struct fields untyped/abstract.

I actually just shared the rules, ast-grep linters, and a 10-task A/B measurement (bare repo vs. directives + AST/allocation gates) over in the Tooling category today if anyone is experimenting with deterministic guardrails for this: Julia-agent-tools: agent directives, ast-grep rules, and a ctags optlib for Julia