Mastery Module 10 · Planning & Orchestration

Breaking Down Tasks

How to chunk big projects into AI-friendly pieces

The chunking problem

You want to build a complete e-commerce website. You tell the AI:

Build me an e-commerce site with product listings, a shopping cart,
user authentication, payment processing, an admin dashboard, order
tracking, email notifications, and a review system.

The AI tries — and produces a messy, half-working result. Too many things at once. Context gets scattered. Pieces don’t fit together.

The solution: break it into chunks.

The chunking strategy

Think of building a project like building a house. You don’t say “build me a house” and walk away. You work in phases:

  1. Foundation — project setup, basic structure
  2. Frame — core layout, navigation, routing
  3. Rooms — individual features, one at a time
  4. Finishing — polish, responsive design, edge cases
  5. Inspection — testing, bug fixes, deployment

Applied to the e-commerce example:

Chunk 1: Foundation

Create a new React project with Vite and Tailwind CSS.
Set up the basic layout: header with logo and nav, main content area,
and footer. Dark theme. Three routes: Home, Products, Cart.

Chunk 2: Product display

Create a products page that displays items in a grid.
Each card shows: product image, name, price, and an "Add to Cart" button.
Use mock data with 8-12 realistic products.

Chunk 3: Shopping cart

Implement the shopping cart:
- Clicking "Add to Cart" adds the item
- Cart page shows all items with quantities
- Users can adjust quantities or remove items
- Show subtotal and total
- Save cart to localStorage

Chunk 4: Authentication (if needed)

Add user authentication:
- Login and signup pages
- Form validation
- Store auth state in context
- Protected routes for checkout
- Mock authentication (no real backend yet)

Each chunk is self-contained. Each builds on the last. Each is small enough for the AI to handle well.

The rule of one

A good chunk follows the rule of one:

Each prompt should ask for one feature or one logical group of changes.

Not: “Add authentication, a payment form, and email notifications.” Instead:

  1. “Add authentication with login and signup.”
  2. (After that works) “Add a payment form on the checkout page.”
  3. (After that works) “Add email notifications for order confirmations.”
Commit between chunks

After each chunk, test it and commit to git. This way, if the next chunk breaks something, you can go back to a working state. Think of it as saving your game between levels.

Sequencing matters

Some chunks depend on others. Plan the order:

1. Project setup (foundation for everything)
2. Layout + Navigation (frame)
3. Product listing (needs layout)
4. Product detail page (needs products)
5. Shopping cart (needs products)
6. Checkout flow (needs cart)
7. User authentication (needs checkout)
8. Order history (needs auth + checkout)

Each step has clear dependencies. Don’t try to build step 6 before step 3 works.

Chunk sizing

How big should each chunk be? Here’s a guide:

Chunk sizeExampleWhen to use
Small (1 feature)“Add a search bar to the header”Most of the time
Medium (2-3 related features)“Add login, signup, and logout”When features are tightly connected
Large (whole page/section)“Build the product listing page with grid, filters, and sort”For initial scaffolding only

When in doubt, go smaller. A prompt that’s “too small” just means you’ll need one more prompt. A prompt that’s “too big” risks confusion and errors.

The iteration pattern

Real building isn’t linear. It’s a loop:

Plan chunk → Prompt AI → Review result → Fix issues → Commit → Next chunk

The “fix issues” step is normal and expected. No chunk will be perfect on the first try. That’s fine — iteration is fast with AI tools.

Common iteration prompts:

  • “The navigation bar overlaps the content on mobile. Fix it.”
  • “The cart total isn’t updating when I change quantities.”
  • “Add error handling — right now it crashes if the product image fails to load.”
  • “Make the product cards equal height regardless of content.”

These are refinement chunks — small, specific, and fast to execute.

Practical exercise

Take any project idea and break it into 5-8 chunks right now. Use this template:

Project: [description]
Chunk 1 (Foundation): Set up project with [tech], basic layout
Chunk 2 (Core feature): Build [primary feature]
Chunk 3 (Core feature): Build [second feature]
Chunk 4 (Enhancement): Add [supporting feature]
Chunk 5 (Enhancement): Add [another feature]
Chunk 6 (Polish): Responsive design, error handling
Chunk 7 (Deploy): Push to GitHub, deploy to web

This becomes your roadmap. Work through it one chunk at a time, committing after each one.