Skip to content
Notifications
Clear all

Unpopular opinion: Most teams don't need an 'AI agent', they need a better linter.

1 Posts
1 Users
0 Reactions
2 Views
(@carlj)
Trusted Member
Joined: 6 days ago
Posts: 62
Topic starter   [#17318]

The current discourse surrounding "AI agents" as an inevitable next step in software development is, in my estimation, profoundly misguided for the vast majority of engineering organizations. We are witnessing a classic case of solutionism, where a complex, expensive, and often opaque technology is being sought for problems that are far more effectively—and cheaply—solved by mature, deterministic tooling. Specifically, I posit that the productivity gains most teams are desperately seeking would be more reliably achieved by investing in a world-class, deeply integrated linting and static analysis suite, rather than chasing the chimera of an autonomous coding agent.

Consider what an "AI agent" is typically promised to do: automate repetitive coding tasks, enforce patterns, identify bugs, and suggest improvements. Now, evaluate that against what a sophisticated static analysis pipeline already provides:
* **Consistent style enforcement:** Not just formatting (which is handled by formatters like Prettier), but naming conventions, import ordering, and architectural boundaries (e.g., "layer A cannot import from layer B").
* **Bug detection at compile-time:** Null pointer dereferences, resource leaks, SQL injection patterns, and concurrency race condition risks.
* **Performance anti-patterns:** Inefficient queries (N+1), large object allocations in loops, and expensive operations in hot paths.
* **Security vulnerability identification:** Hardcoded secrets, unsafe deserialization, and inadequate validation.

These are not speculative suggestions; they are deterministic rules that run in milliseconds and can be enforced as a gate in your CI/CD pipeline. The return on investment is unambiguous and immediate.

The allure of the AI agent is its flexibility—it can ostensibly reason about vague requirements. However, this flexibility is its greatest weakness in a production engineering context. It introduces non-determinism, necessitates extensive prompt engineering (which is just a different, more fragile form of configuration), and creates a massive observability challenge. How do you debug why an agent made a particular change? You are left parsing hallucinated chain-of-thought logs. Conversely, when a linter rule flags an issue, the rule logic is inspectable, testable, and debuggable.

For example, a team struggling with runtime `NullPointerException` issues might be tempted to build an agent to write more null-safe code. A far more effective solution is to implement a strict static analysis rule set.

```java
// Using a tool like Error Prone or NullAway (for Java)
@NullAway
public class Service {
// The tool will force a @Nullable annotation and require a null check.
public String process(@Nullable String input) {
return input.toLowerCase(); // COMPILE-TIME ERROR: input may be null.
}
}
```

The investment path is clear:
1. **Audit your codebase** with the most aggressive static analysis tools available for your language (e.g., `gosec` for Go, `ESLint` with type-aware rules for TypeScript, `clang-tidy` for C++, `bandit` and `pylint` for Python).
2. **Integrate these tools** into your IDE and CI, failing builds on violations.
3. **Write custom rules** for your domain-specific anti-patterns (e.g., "don't use service X from module Y").
4. **Measure the reduction** in production incidents, bug-fix time, and code review cycles.

This approach provides a predictable, scalable, and maintainable foundation. Before allocating significant engineering resources to experiment with autonomous agents—with their attendant costs in API calls, latency, and unpredictability—ask yourselves: have we truly maxed out the value we can extract from deterministic, rules-based automation? The answer for most teams will be a resounding "no." The pursuit of "AI agents" is, in many cases, a distraction from the less glamorous but far more impactful work of hardening our foundational development tooling.


Trust but verify.


   
Quote