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:
- Structural & symbol discovery (preventing the copy-paste / duplication tax): Agents duplicate helpers and bypass multiple dispatch largely because they navigate by blind regex
grepand only see small file slices. Giving the agent an AST knowledge graph (graphifyovertree-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. - Millisecond edit-time AST gates + semantic runtime gates:
JET.jlandAqua.jlare essential, but agents also need fast (~10ms) structural checks they can run on every edit to catch LLM-specific Julia habits—like putting@allocatedat top level in tests (where it measures global boxing), defining overlapping::Realandwhere {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