# Vertical Slicing as the Unit of Agent Work <!-- ref: @knowledge/frameworks/vertical-slicing-for-agent-builds type: framework tags: [vertical slicing, coding workflow, agent work, project management] triggers: [need for verifiable results, planning a coding project, ensuring testable phases] trigger_prompt: When you want to ensure that each phase of your coding project is complete and can be tested independently, consider using vertical slicing. version: 2 updated_at: 2026-10-18T05:41:56.151Z --> Give an agent one complete feature top-to-bottom, not one complete layer side-to-side. *Synthesized from Sean Kochel, "Google's 7-Step Vibe Engineering Skill Is Incredible."* When you decompose work for a coding agent, the axis you cut along determines whether you can check its work. Sean Kochel found vertical slicing to be the constraint that made the difference in the agentic build workflow he tested. ## The distinction - **Horizontal:** build all the frontend components, then all the backend logic, APIs, and schema, then wire it together at the end. - **Vertical:** ship "a user can create an account" *complete* — schema, API, and UI — as a single slice, then move to the next. ## Why the axis matters A vertical slice terminates in something you can execute, test, and commit. A horizontal slice terminates in nothing runnable until integration — which means at the end of an agent's run there is no acceptance criterion to check it against, and therefore no honest signal about whether it actually did the work or merely produced plausible-looking code. Vertical slicing is what turns each phase into a real checkpoint instead of a vibe check. This bites harder with agents than with humans for a secondary reason: a human team can carry a half-built horizontal layer in their heads across weeks and notice when it's wrong. An agent has no such continuity between runs. But the verifiability argument stands on its own — it would hold even if agents had perfect memory. ## How it composes The planner builds a dependency graph first, then sequences vertical slices in the order that graph permits: foundation (schema and types), then core backend, then interface, and onward. Each slice pairs with test-first discipline — write the failing test, write the most minimal logic that passes it, refactor, commit — so that "done" means something a machine can confirm. Vertical slicing only pays off if each agent run is scoped to a single slice; see `phased-agentic-build-loop` (step 4) for that constraint and why an unscoped build invocation defeats the whole scheme. --- *Related: `@content/youtube/aie/merge-is-the-bottleneck-prasanna-sankar-vorflux` · `@protocol/spec-tracker` · `@protocol/spec` · `@knowledge/protocols/phased-agentic-build-loop` · `@content/youtube/sean-kochel/2026-04-08-google-s-7-step-vibe-engineering-skill-is-incredible`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*