SaaS

Vertical Slice Development: How I Build Complete Features With AI Coding Agents

Discover how to effectively use AI coding agents with vertical slice development for robust feature creation in software projects. Enhance your product outcomes.

Mohammad Sazzad Hossain

November 25, 2026 19 min read 1 view

Vertical Slice Development: How I Build Complete Features With AI Coding Agents

One of the things that surprised me about AI-assisted development is how quickly a project can start looking like a finished product.

You ask an AI coding agent to create a product management module. Within minutes, it can generate database migrations, API endpoints, services, controllers, and a reasonably polished user interface.

You open the application. The screens look good. Forms are working. Data is being saved.

It feels like progress.

But there is a question I have learned to ask myself before getting too excited:

Does this feature actually work as part of the business, or does it only work as an isolated piece of software?

There is a significant difference.

A product creation form that saves data successfully is useful. But in a retail POS system, that product eventually needs to participate in purchasing, stock receiving, inventory movements, pricing, sales, returns, and reporting.

If those connections are poorly designed, the application may look complete long before it is ready for real customers.

While preparing the implementation strategy for EZSell V2, this became one of my main concerns.

I wasn't interested in generating hundreds of screens or API endpoints as quickly as possible. I wanted a development approach where every completed piece had a clear business purpose, followed the approved architecture, and could be tested properly.

That is why I structured the implementation roadmap around vertical slices.

The idea is not new. Vertical slice development has existed long before AI coding agents.

But I think it has become much more valuable in the age of vibe coding.

Because when generating code becomes easy, controlling what gets built becomes the harder part.


1. Why I Don't Want AI to Build the Entire Application at Once

In traditional software development, we often organize work around technical layers.

A backend team develops APIs.

A frontend team builds the user interface.

Database changes happen separately.

QA begins testing once enough functionality is available.

This can work, particularly in larger engineering organizations where responsibilities are clearly separated.

But there is a problem when the same approach is applied blindly to AI-assisted development.

Imagine giving an AI coding agent this instruction:

"Build the complete inventory management module."

The agent could generate dozens of files covering products, stock movements, transfers, receiving, adjustments, and inventory reports.

It might even produce a convincing demonstration.

But how do I know that the implementation is correct?

Does receiving stock increase the correct inventory balance?

Can stock be transferred between locations without creating inconsistencies?

What happens if a transaction fails halfway through?

Does the system properly enforce tenant isolation?

Can unauthorized users modify stock?

Are the financial implications handled correctly?

A large implementation introduces too many questions at once.

Even if most of the generated code is correct, the remaining problems can become difficult to isolate.

The faster AI generates code, the easier it becomes to accumulate complexity before validating the foundations.

I wanted to avoid that.


2. Understanding Vertical Slice Development

The idea behind vertical slice development is fairly straightforward.

Instead of dividing software development by technical layers, divide it by business capabilities.

A vertical slice is a small, complete piece of functionality that passes through the technical layers necessary to deliver a working outcome.

For example, consider the ability to create a product.

A complete slice might involve:

  • A product creation screen

  • Frontend validation

  • An API endpoint

  • Business logic

  • Database persistence

  • Permission checks

  • Tenant isolation

  • Automated tests

  • Acceptance criteria

These components are not treated as separate projects.

They are developed together because they serve one business purpose.

The result is something that can be demonstrated and validated.

A successful slice does not mean the entire Product Management module is finished.

It means one clearly defined capability is working properly.

That distinction matters.

Horizontal vs. vertical development

Here is how I think about the difference.

Horizontal developmentVertical slice developmentBuild database tables for every moduleBuild the required data model for one capabilityCreate all API endpointsCreate the endpoints needed for the current workflowBuild all application screensBuild the interface needed for the current workflowIntegrate everything laterIntegrate the required layers immediatelyTest the system after major developmentTest each completed capabilityProgress measured by components completedProgress measured by working business outcomes

Neither approach is universally right or wrong.

A project still needs shared infrastructure, foundational architecture, and sometimes dedicated platform work.

But for implementing business functionality with AI coding agents, I increasingly prefer the vertical approach.

It gives me smaller boundaries, faster feedback, and a clearer understanding of what is actually complete.


3. How This Applies to EZSell V2

EZSell V2 is a multi-tenant retail POS and inventory SaaS platform.

The system covers several connected business domains, including products, pricing, purchasing, inventory, customers, suppliers, sales, payments, accounts, and counter sessions.

These are not independent features.

They affect one another.

For example, a sale can involve product pricing, inventory deduction, payment collection, accounting records, customer balances, and counter transactions.

That makes implementation order important.

I cannot responsibly ask an AI coding agent to build a production-ready sales workflow without first establishing the foundational rules it depends on.

The same applies to inventory receiving.

Before receiving stock, the system needs an approved product structure, location handling, inventory rules, and purchasing behavior.

This is why I organized the EZSell V2 roadmap into sequenced vertical slices with dependencies and validation gates.

Some foundational capabilities need to be established before others can be implemented.

The approach is simple:

Build the smallest complete capability, prove that it works, and then expand the system without breaking what already exists.

Let me explain that using a practical example.


4. Example: Building Product Creation as a Vertical Slice

Suppose I want an AI coding agent to implement product creation in EZSell V2.

The obvious prompt would be:

"Build the Product Management module."

I would avoid that.

Product Management contains many capabilities: product creation, variants, categories, brands, units, pricing, barcodes, status management, and more.

Instead, I would start with a narrower objective.

Allow an authorized user to create a product using the approved product configuration and business rules.

The exact fields and validations must come from the approved EZSell V2 specifications, not from assumptions in the prompt.

That becomes the implementation boundary.

First, identify the authoritative requirements

Before writing code, the agent needs to understand the rules.

For this capability, the relevant documents may include:

  • Product Management specification

  • Product configuration and numbering rules

  • Database design

  • API contracts

  • Authentication and authorization requirements

  • Tenant isolation rules

  • Applicable UAT scenarios

Notice that I am not asking the agent to read every document in the project.

Only the documents relevant to the current capability.

This is something I discussed in Article 2 of this series: good documentation must be translated into focused implementation context.

Next, identify the technical changes

The agent should inspect the existing repository and propose what needs to change.

For example, the implementation may require a product creation form, an API endpoint, a service method, database changes, validation, authorization, and tests.

But I do not want the agent to immediately generate everything.

I want it to explain its plan first.

Which existing components can be reused?

Which database tables are involved?

Does the schema already support the requirement?

Will the change affect any shared functionality?

Are there missing business decisions?

This gives me an opportunity to catch misunderstandings before they become code.

Then, implement the complete capability

Once the plan is reviewed, the agent can implement the required layers.

The result should not be considered complete simply because a product can be saved.

The implementation must also satisfy its approved validation rules, permissions, tenant boundaries, and acceptance criteria.

It should handle expected failures without leaving inconsistent data.

And there should be automated tests that demonstrate the important behavior.

Only then does the slice become a candidate for completion.


5. A Vertical Slice Should Be Small, But Not Incomplete

This is an important distinction.

When I say a vertical slice should be small, I do not mean it should contain unfinished functionality.

For example, I would not consider product creation complete if:

The UI works, but the API has no authorization.

Or the API works, but validation is missing.

Or records are saved, but tenant isolation is not enforced.

Or the happy path works, but failures are not handled.

Those are incomplete implementations.

A small slice should have limited scope but complete behavior within that scope.

This is where I think some vibe-coding workflows go wrong.

The temptation is to move to the next feature as soon as the current screen appears to work.

It feels productive.

But unfinished behavior accumulates.

Eventually, the application contains a large number of features that are each 70% or 80% complete.

The remaining work becomes increasingly difficult because bugs and dependencies start overlapping.

I would rather complete five capabilities properly than generate twenty partially working features.


6. The Next Slice Should Build on the Previous One

Once basic product creation is complete, the next slice might introduce another capability from the approved roadmap.

For example, product variants.

Then pricing.

Then a purchasing or stock-receiving capability, once its dependencies are ready.

Each slice builds on something that has already been implemented and validated.

This creates a development sequence where progress is cumulative.

However, there is a subtle architectural point here.

Vertical slices do not mean designing the database one table at a time without understanding the wider system.

That would create a different problem.

For EZSell V2, foundational architecture and cross-module database relationships are defined ahead of implementation.

The slices determine how that architecture is delivered incrementally.

This distinction is important.

I want the agent to implement incrementally, but I do not want it to invent architecture incrementally without reference to the approved system design.


7. Cross-Module Workflows Are Where Things Become Interesting

Simple CRUD functionality is relatively easy for AI coding agents.

The more interesting challenges appear when one business action affects multiple modules.

Take stock receiving in a retail system.

A user receives products against a purchase.

That action may involve validating the purchase status, recording received quantities, creating inventory movements, updating stock balances, and maintaining the appropriate audit history.

Depending on the approved business workflow, there may also be accounting implications.

A poorly designed implementation might save the receiving record successfully while failing to update inventory.

Or it might update inventory twice when the same request is submitted again.

Or it might partially complete the operation before an error occurs.

These problems are not necessarily visible from the user interface.

That is why I want a vertical slice to represent a complete business transaction, not just a collection of screens.

For stock receiving, the agent needs to understand the applicable transaction boundaries, state transitions, permissions, and idempotency requirements.

If the relevant records must succeed or fail together, the implementation needs to preserve that atomicity.

The exact behavior must follow the approved specification.

This is where AI-generated code needs careful engineering review.

A feature that looks simple from the outside may carry serious data-integrity risks.


8. I Use Acceptance Criteria to Define the Finish Line

One thing I try to make explicit before implementation is how the slice will be evaluated.

What exactly must happen before I can say the work is complete?

For a stock-receiving slice, a proposed acceptance checklist might include the following, subject to the approved product rules:

  • An authorized user can receive eligible stock.

  • Received quantities follow the documented validation rules.

  • Inventory movements are recorded correctly.

  • Stock balances reflect the completed operation.

  • Invalid status transitions are rejected.

  • Repeated requests follow the documented idempotency behavior.

  • Failed operations do not leave partial inventory updates.

  • Users cannot access another tenant's records.

  • Automated tests cover the critical success and failure paths.

This is much more useful than saying:

"Implement stock receiving and make sure it works."

The first version defines observable outcomes.

The second leaves too much to interpretation.

And with AI coding agents, interpretation is precisely what I want to minimize when implementing important business logic.


9. The AI Agent Needs to Understand the Entire Slice, Not Just Its Assigned File

This is another change in how I think about task execution.

A common way to use AI is to ask it to work on individual files.

"Create this controller."

"Write this React component."

"Generate this migration."

"Fix this service."

There is nothing wrong with using AI for individual implementation tasks.

But I do not want the broader business capability to disappear behind those tasks.

If an agent is creating the receiving API, it should understand how the API participates in the complete receiving workflow.

It should know which validation rules apply, which state transitions are valid, and which tests demonstrate the outcome.

Otherwise, it may produce locally correct code that does not fit the system.

This is one reason I prefer starting with a capability-level task and then allowing the agent to break it into technical changes.

The business objective remains visible throughout implementation.


10. My Preferred Workflow: Plan Before Generating Code

One of the most useful habits I have developed with AI-assisted work is separating planning from implementation.

I do not want an agent to treat every prompt as permission to start modifying files immediately.

For a meaningful vertical slice, I prefer an initial planning step.

The agent should read the relevant documentation, inspect the repository, identify dependencies, and explain its proposed implementation.

If something is unclear, this is the right time to raise it.

For example:

What happens when the user submits the same receiving request twice?

Can a partially received purchase be received again?

Should the operation update accounting records immediately or through another approved process?

These are product questions.

If the specification already answers them, the agent should follow it.

If it does not, the agent should raise the conflict instead of making up a rule.

Once the implementation plan is sound, coding can begin.

This does not guarantee that the code will be correct.

But it reduces the chance of discovering a major misunderstanding after the agent has changed dozens of files.


11. How AGENTS.md Fits Into Vertical Slice Development

In Article 3, I explained why I started treating AGENTS.md as the operating manual for an AI coding agent.

Vertical slice development is where that file becomes particularly useful.

The slice describes what needs to be built.

AGENTS.md defines how the agent should behave while building it.

For example, the repository instructions may require the agent to:

  • Follow the Source-of-Truth Index.

  • Preserve the approved architecture.

  • Enforce tenant isolation and server-side authorization.

  • Avoid unrelated refactoring.

  • Use approved transaction and error-handling patterns.

  • Add meaningful tests.

  • Stop when business rules conflict.

  • Verify the Definition of Done before reporting completion.

These instructions should not have to be repeated in every task prompt.

That is the point of having persistent repository guidance.

The individual slice remains focused on its specific capability.

The repository rules provide consistency across tasks.

For me, these two pieces complement each other.


12. Testing Is Part of the Slice, Not a Separate Phase

This is an area where I would be especially careful with AI-generated code.

AI can produce working-looking code very quickly.

It can also produce tests that appear reasonable but fail to verify the actual business rules.

A test that confirms an endpoint returns HTTP 200 does not necessarily prove the operation is correct.

For example, a receiving API might return success while updating the wrong stock balance.

A sale might complete while recording an incorrect payment amount.

A user might successfully create a record while bypassing permission checks.

For critical business operations, I want testing to cover more than the happy path.

The test strategy should include relevant validation errors, authorization failures, tenant isolation, invalid state transitions, transaction rollback, and repeated requests.

And I do not want the same agent's claim that its tests passed to be the only evidence.

For important functionality, I want to inspect the test results, review the actual changes, and validate behavior against the acceptance criteria.

AI-generated tests are useful. Independent verification is still necessary.

This is especially true for systems involving inventory, money, and customer data.


13. Don't Confuse Working Code With a Completed Feature

One of the biggest problems with AI-assisted development is that visual progress can be misleading.

A polished UI makes a feature feel finished.

An API response makes the backend feel functional.

A passing test suite creates confidence.

But those signals need context.

I would consider a vertical slice complete only when the requested behavior works end to end and the applicable completion criteria have been verified.

For a production-oriented slice, that may include documentation updates, appropriate error handling, authorization, transaction integrity, automated tests, and UAT evidence.

Not every slice requires the same amount of testing or documentation.

A simple configuration screen does not carry the same risk as a payment or inventory transaction.

The standard should match the risk.

The important thing is to define that standard before declaring the feature finished.


14. Small Slices Make Debugging and Rollback Easier

There is another practical advantage that becomes more important as AI agents generate larger amounts of code.

Smaller changes are easier to understand.

If an agent changes five related files to deliver one capability, reviewing the work is manageable.

If it changes forty files across six modules, understanding the impact becomes much harder.

I prefer to keep each slice logically isolated and commit it once it has passed review.

That helps with debugging.

If a regression appears, there is a clearer boundary around the change.

If something needs to be rolled back, it is easier to identify the affected functionality.

It also improves continuity between AI sessions.

The next task begins from a known state rather than from a half-finished collection of generated changes.

There is a limit, though.

I would not split a business transaction into arbitrary tiny pieces simply to make every commit smaller.

A slice should be small enough to manage, but large enough to represent a meaningful outcome.


15. Vertical Slices Don't Eliminate the Need for Foundational Engineering

I want to address a misconception.

Some people interpret vertical slice development as an instruction to build everything feature by feature without doing architectural planning.

That is not how I approach it.

EZSell V2 still needs foundational capabilities.

Tenant isolation.

Authentication and authorization.

Database conventions.

Error handling.

Logging and audit patterns.

Development environments.

Deployment and testing infrastructure.

These foundations may need to be implemented and validated before more complex business workflows can work safely.

In fact, the EZSell V2 roadmap includes gated foundational work before production-grade sales functionality.

That is intentional.

A team can build vertical slices on top of a stable foundation without over-engineering the entire future system.

The goal is to avoid unnecessary implementation, not necessary architecture.


16. Where I Think Vertical Slice Development Is Especially Useful

I find this approach particularly suitable for business applications where features are closely connected.

Retail POS systems are one example.

CRM and ERP platforms are others.

Subscription-based SaaS products also benefit because actions involving billing, permissions, tenant settings, and user workflows often cross multiple application layers.

But I would not force every task into a vertical slice.

A security patch, dependency upgrade, infrastructure change, or performance improvement may be better handled as focused technical work.

The important distinction is whether the work represents a user-facing or business capability that can be validated end to end.

For those capabilities, vertical slices provide a useful implementation boundary.


17. The Real Change Is How I Measure Progress

As a Product Manager, I have spent years tracking work through roadmaps, backlogs, sprint goals, and release plans.

One lesson from that experience is that completed tasks are not always the same as delivered value.

AI coding tools make this distinction even more important.

It is easy to generate a large amount of code.

It is easy to create multiple screens.

It is easy to close technical tasks.

But none of those activities automatically means the product is becoming more useful.

With vertical slices, I can ask a much better question:

What can the user actually do now that they could not do before?

Can they create a product?

Can they receive stock?

Can they complete a sale?

Can they process a return?

Can they reconcile a transaction?

Each validated capability represents meaningful product progress.

That is much easier to communicate to stakeholders, too.

Instead of saying the team has completed 80% of backend development and 60% of frontend development, I can demonstrate which business workflows are actually functioning.

For me, that is a more useful way to think about delivery.


18. What I Would Avoid When Using AI Agents

There are a few approaches I deliberately want to avoid in a serious AI-assisted development workflow.

I would not ask an agent to generate an entire business module without defining implementation boundaries.

I would not build all frontend screens using mock data and assume the backend integration will be straightforward later.

I would not allow the agent to redesign shared architecture just to complete a small feature.

I would not start dependent workflows before the required foundations are validated.

I would not treat an AI-generated test suite as sufficient proof without reviewing whether it tests the correct business behavior.

And I would not move to the next capability simply because the current feature looks finished.

These are not problems unique to AI.

Software teams have dealt with them for decades.

AI simply makes it possible to create the consequences much faster.


19. My Preferred AI-Assisted Development Loop

The implementation workflow I am using as the foundation for EZSell V2 can be summarized as:

Select a Capability → Identify Dependencies → Load Relevant Specifications → Review Agent Plan → Implement End to End → Test → Validate UAT → Review → Commit

Each stage has a purpose.

Selecting the capability keeps the work focused.

Checking dependencies prevents implementation in the wrong order.

Loading relevant specifications gives the agent the correct context.

Reviewing the plan catches misunderstandings before coding.

End-to-end implementation prevents disconnected technical layers.

Tests and UAT provide evidence that the business behavior works.

Review and commit establish a clean baseline for the next slice.

The workflow is not complicated.

But following it consistently matters more than writing an exceptionally clever prompt.


20. What AI Changed—and What It Didn't

AI has significantly reduced the effort required to turn a clear implementation plan into code.

That is the opportunity.

But it has not removed the need to decide what should be built, how business rules interact, which architecture constraints matter, or how correctness should be verified.

If anything, the importance of these decisions has increased.

The coding agent can move quickly.

The product definition needs to keep up.

I see vertical slice development as a practical way to connect those two sides.

It creates an implementation unit that is small enough for AI to handle effectively, but meaningful enough for a Product Manager to validate.

It also keeps the focus on the product rather than the amount of code being produced.

And that is the part I care about most.


Final Thoughts: Build Less at Once, Finish More

When I first started experimenting with AI-assisted development, speed was the most exciting part.

Being able to describe something and see working code appear almost immediately changes how you think about building software.

But speed alone does not produce a dependable product.

The more complex the business rules become, the more important it is to control the implementation process.

That is why I prefer vertical slices.

Not because they are new.

Not because AI invented them.

But because they provide something AI coding agents need: a clear, bounded definition of what success looks like.

For EZSell V2, that means building capabilities in the right sequence, following the approved specifications, and validating each important business workflow before expanding further.

I would rather have a smaller system that works correctly than a large application that only looks complete.

My biggest takeaway is this:

Don't measure AI-assisted development by how much code the agent generates. Measure it by how many complete, reliable business capabilities you can actually deliver.

That is the difference between generating software and building a product.

And for me, that is where vibe coding starts becoming a disciplined development process.


This is Article 4 of my Vibe Coding Without Chaos series, where I share my approach to combining product management, software architecture, and AI coding agents to build more dependable applications.

Previously in the series:

  1. Vibe Coding Without Chaos: How to Prepare Software Documentation for AI-Assisted Development

  2. From PRD to Code: How I Turn Product Requirements Into AI Coding Tasks

  3. How to Write AGENTS.md for AI Coding Agents: The Operating Manual for Your Repository

Next in the series: How I Give AI Coding Agents Context Without Overloading Them.