cd /news/ai-agents/ai-agents-changed-my-opinion-on-vert… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-77318] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=Β· neutral

AI agents changed my opinion on vertical slices.

A developer argues that vertical slice architecture is better suited for AI agent collaboration than traditional layered architecture. Organizing code by features rather than layers reduces coordination overhead and makes ownership boundaries clear for both human developers and AI agents.

read2 min views1 publishedJul 28, 2026

For years, I preferred a traditional layered architecture.

Controllers/
Services/
Repositories/
DTOs/
Models/

It makes navigation straightforward. If I need a repository, I know exactly where to look.

Then I started working with multiple AI agents, and suddenly the optimization target changed. Imagine one agent implementing Shipping while another implements Billing.

With a layered architecture, they both end up touching controllers, services, repositories, tests, and dependency injection, even though they are working on different features. The implementation of a single feature becomes scattered across the entire project. So does the code review.

The model that worked better was organizing the code around features instead of layers. Shipping and Billing stop being scattered concepts that have to be reconstructed from several folders. They become visible parts of the project structure.

Features/
β”œβ”€β”€ Shipping/
β”‚   β”œβ”€β”€ Controllers/
β”‚   β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ Repositories/
β”‚   └── DTOs/
β”‚
└── Billing/
    β”œβ”€β”€ Controllers/
    β”œβ”€β”€ Services/
    β”œβ”€β”€ Repositories/
    └── DTOs/

Now each agent owns an entire feature, not just a few files spread across the solution. Reviewing changes becomes opening Features/Shipping

instead of searching through controllers, services, repositories, DTOs, dependency injection, and tests in different places.

The same ownership boundary applies to verification. If the implementation belongs to a feature, the tests that prove it works should be organized by that feature too. Otherwise the review still requires jumping between multiple layers within the test project aswell.

Features/
β”œβ”€β”€ Shipping/
β”‚   β”œβ”€β”€ HTTP/
β”‚   β”œβ”€β”€ Repository/
β”‚   └── Unit/
β”‚
└── Billing/
    β”œβ”€β”€ HTTP/
    β”œβ”€β”€ Repository/
    └── Unit/

Each agent only owns the implementation and everything required to verify it. That keeps the task boundary clear: the agent changes the feature, updates the relevant tests, and leaves the rest of the system alone. Nothing more.

I previously argued that event-driven architectures work well with AI because they make behavior observable. I think this is the architectural equivalent.

Vertical slices make ownership immediately observable. You immediately know which agent owns a feature, where to review its changes, and where its tests live.

The interesting part is that vertical slices were not designed for AI. They were designed to improve cohesion. Agentic development simply exposes the same problems again: Agents need to coordinate with each other just like humans do.

The less coordination your architecture requires, the better it works for humans and AI alike.

── more in #ai-agents 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/ai-agents-changed-my…] indexed:0 read:2min 2026-07-28 Β· β€”