Agentic AI
AI Coding Agents: Five Strategic Ways to Strengthen Software Architecture
Teams can harness AI coding agents to close knowledge gaps, fix security vulnerabilities, and generate architecturally sound prototypes—but only with clear constraints and measurable quality goals.
InfoQ
AI coding agents work at unprecedented speed, enabling teams to generate code and explore prototypes faster than ever before. However, this velocity introduces a critical risk: without explicit architectural guardrails, the output often fails to meet quality standards. Simply feeding functional requirements to an AI agent won't guarantee sound architecture—teams must instead provide specific, measurable quality goals and articulated trade-offs to guide the system.
Documenting Legacy Dependencies#
Modern systems frequently rely on older services for critical tasks, yet these legacy components often suffer from poor documentation and uncertain behavior. When the original context and logic behind a decades-old system are poorly understood, problems may not surface until testing or production use.
AI agents can map the design and data flows of legacy services, scan their code for potential flaws, and suggest fixes. In cases where a legacy system proves too problematic, agents can even refactor the service to improve maintainability. This approach significantly reduces the architectural risk of depending on undocumented black-box systems.
Identifying and Fixing Architectural Violations#
Beyond security, AI agents excel at detecting architectural inconsistencies—API design flaws, Domain-Driven Design boundary violations, and code that bypasses established standards. However, this capability requires skilled prompting. Teams experienced in architecture must frame requests precisely and constrain the agent's scope, preventing it from generating an endless list of minor improvements that offer diminishing returns.
A productive side effect: articulating constraints for the agent forces teams to become clearer about their architectural trade-offs and what they're willing to accept, strengthening the design conversation itself.
Automating Security Assessments#
Malicious actors already use AI agents to exploit vulnerabilities; the flip side is that AI can identify and patch them just as effectively. By mapping system design, scanning code for complex flaws, and generating hacker-style test scripts, agents can discover vulnerabilities before attackers do—especially valuable when codebases depend on numerous open-source packages.
The workflow requires safeguards: limit agent access to approved files, mask sensitive credentials from prompts, run the agent in an isolated network, and mandate human code review before merging fixes. One team used this approach to evaluate several flagged npm packages, ultimately updating two, replacing one, and dismissing another as a false alarm.

