Three more static code analysis sensors

· Source: Martin Fowler · Field: Technology & Digital — Software Development & Engineering, Artificial Intelligence & Machine Learning · Depth: Advanced, extended

Summary

This article details experiments with various maintainability sensors for AI coding agents, focusing on static code analysis and regression testing. The author rebuilt an internal analytics dashboard using TypeScript, NextJS, and React with agents like Cursor and Claude, observing their self-correction capabilities. Key sensors included ESLint for basic linting, dependency-cruiser for enforcing modularity rules, and a custom tool for coupling metrics. An AI-driven modularity review, using Vlad Khononov's "Modularity Skills" with Claude Opus 4.7, proved effective in identifying design issues like duplicate code and inconsistent backend calls. Mutation testing with Stryker was also employed to assess test suite effectiveness, revealing gaps even with 100% coverage. The article, published with revisions on May 19, 20, and 27, 2026, highlights the potential of computational and inferential sensors to improve AI-generated code quality.

Key takeaway

For AI Engineers building with coding agents, integrating a robust sensor system is crucial for managing code maintainability. You should implement custom static analysis rules and dependency-cruiser to enforce structural quality early. Additionally, use AI-driven modularity reviews with powerful prompts to uncover deeper design issues. Crucially, deploy mutation testing to validate the effectiveness of AI-generated test suites, preventing false senses of security and reducing future technical debt.

Key insights

Computational and inferential sensors significantly enhance AI coding agent self-correction and code maintainability, especially when combined with semantic interpretation.

Principles

Method

The author rebuilt an application with AI, then implemented and observed various computational (ESLint, dependency-cruiser, mutation testing) and inferential (AI modularity review, coupling analysis) sensors to provide feedback for agent self-correction.

In practice

Topics

Code references

Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Martin Fowler.