Mastery Module 10 · Planning & Orchestration

Breaking Down Tasks

What you'll learn

~20 min
  • Decompose a large project into sequential, AI-friendly chunks
  • Apply the 'rule of one' to keep each prompt focused
  • Sequence chunks so each builds on a working foundation
  • Use the commit-between-chunks pattern to maintain safe rollback points

By the end of this lesson, you will be able to take any big project idea and break it into a sequence of small, focused prompts that the AI can handle one at a time — producing better results with less frustration.

Mental model: building a house

You would never hand a contractor a single instruction that says “build me a house with 4 bedrooms, 3 bathrooms, a kitchen, a garage, solar panels, a pool, and a home theater.” Even if the contractor is skilled, that is too much at once. Things get missed, priorities get confused, and the result is a mess.

Instead, you build in phases: foundation first, then framing, then rooms, then finishing. Each phase builds on the last. Each phase is inspected before the next begins.

AI tools work best this way: one focused request at a time, building on validated progress.

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 do not fit together.

Why does this happen? AI tools have a context window — the amount of text they can consider at once. When you ask for too many features in one prompt, the AI may lose track of earlier details as it works through later ones. In long sessions, earlier context can fade. By keeping chunks small, you keep the AI focused on one thing at a time.

The solution: break it into chunks.

The chunking strategy

Think of building a project in five 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.

Worked example: a complete multi-step workflow

Let us walk through the entire conversation flow for building a research literature tracker. This is what the back-and-forth with your AI tool actually looks like:

Your plan (60 seconds, on paper):

  • A tool to track papers I have read, want to read, and am currently reading
  • For me (personal research use)
  • Table of papers with title, authors, year, status, and notes
  • Add/edit/delete papers, filter by status, search by title

Chunk 1 — Foundation (you type this into your CLI tool):

Create a literature tracker app with React and Vite.
Set up a clean dark theme with a header that says "Research Tracker."
No features yet -- just the layout shell with a centered content area.

AI builds it. You run npm run dev, see the header and empty page. It works.

Terminal window
git add .
git commit -m "Set up project shell with header and dark theme"

Chunk 2 — Core data display:

Add a papers table to the main page. Columns: Title, Authors, Year,
Status, and a Notes preview. Use this mock data for now:
- "Attention Is All You Need" / Vaswani et al / 2017 / Read
- "BERT: Pre-training of Deep Bidirectional Transformers" / Devlin et al / 2019 / Reading
- "GPT-4 Technical Report" / OpenAI / 2023 / Want to Read
Make the table sortable by clicking column headers.

AI adds the table with mock data. You check it, looks good.

Terminal window
git add .
git commit -m "Add sortable papers table with mock data"

Chunk 3 — Add paper form:

Add an "Add Paper" button above the table. Clicking it opens a form
with fields for title, authors, year, status (dropdown: Want to Read,
Reading, Read), and notes (textarea). Submitting adds the paper to
the table. Save all papers to localStorage so they persist on refresh.

AI builds the form. You test adding a paper, refreshing — data persists.

Terminal window
git add .
git commit -m "Add paper form with localStorage persistence"

Chunk 4 — Search and filter:

Add a search bar above the table that filters papers by title or author
as you type. Add three filter buttons next to it: All, Reading, Read,
Want to Read. Active filter gets a highlighted style.
Terminal window
git add .
git commit -m "Add search and status filter to papers table"

Chunk 5 — Polish:

Make these improvements:
- Add a delete button (trash icon) on each row with a confirmation
- Make the table responsive: on mobile, switch to a card layout
- Add a count badge next to each filter showing how many papers
match (e.g., "Reading (2)")
Terminal window
git add .
git commit -m "Add delete, responsive cards, and filter counts"

Five focused prompts, five clean commits, a working application.

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.

For a safer commit pattern, run git status first to see what changed, then add specific files rather than everything blindly. Make sure you have a .gitignore file so that secrets (.env) and build artifacts (node_modules/) are never committed:

Terminal window
git status
git add src/ package.json
git commit -m "Add search and filter to papers table"
💡Give your AI persistent project context

To avoid re-explaining your project every session, set up a project memory file (like CLAUDE.md or .cursorrules) as covered in Module 9. Most tools can use these files automatically, depending on configuration — verify in your tool’s docs. This is especially valuable for multi-chunk projects where you may return across multiple sessions.

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.”
🧬In Your Field: Biotechclick to expand

Lab notebook app example. A biotech researcher might chunk a digital lab notebook like this: (1) Project shell with dark theme. (2) Experiment entry form with date, title, hypothesis, protocol, and observations fields. (3) Experiment list view sorted by date. (4) Search and filter by date range or keyword. (5) Export entries to CSV for sharing with the PI. Each chunk stands alone and builds on the last.

🎯In Your Field: All Tracksclick to expand

Chunking a Python data analysis pipeline. The same chunking strategy applies to non-web projects: (1) Project setup with virtual environment and dependencies. (2) Data loading module that reads CSV and handles missing values. (3) Analysis module that computes summary statistics. (4) Visualization module that generates charts. (5) CLI entry point with argparse. (6) Add an HTML report output that combines charts and tables. Each chunk is testable: run the script after each step to verify the pipeline works so far.

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; may require auth)
|
7. User authentication (if required before checkout)
|
8. Order history (needs auth + checkout)

Each step has clear dependencies. Do not try to build step 6 before step 3 works.

Chunk sizing

How big should each chunk be? Here is 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 is “too small” just means you need one more prompt. A prompt that is “too big” risks confusion and errors.

🏛️In Your Field: Government / State Devclick to expand

Permit application tracker. Government developers often need internal tools with many form fields. Resist the urge to build the entire form in one chunk. Instead: (1) Basic layout with agency branding. (2) Applicant information section (name, address, contact). (3) Permit details section (type, description, location). (4) Status tracking with workflow stages. (5) Search and reporting view. Each chunk is testable on its own.

The iteration pattern

Real building is not linear. It is 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 is fine — iteration is fast with AI tools.

Common iteration prompts:

  • “The navigation bar overlaps the content on mobile. Fix it.”
  • “The cart total is not 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.

When to start over vs. iterate

Sometimes a chunk goes sideways and you are not sure whether to fix it or start fresh. Here is a quick guide:

  • Iterate when the feature mostly works but has bugs or visual issues. Fix-up prompts are fast.
  • Start over on that chunk when the AI took a fundamentally wrong approach (wrong library, wrong architecture, broken data model). Roll back with git restore . and re-prompt with a more specific request.
  • Start the whole project over almost never. Even if several chunks went wrong, it is faster to roll back to your last good commit and rebuild from there.

Chunking improves reliability significantly, but you should still expect occasional regressions. Verify each change before moving on.

🔧

When Things Go Wrong

Use the Symptom → Evidence → Request pattern: describe what you see, paste the error, then ask for a fix.

Symptom
The AI rewrote files from a previous chunk and broke working features
Evidence
After asking for a search bar, my existing filter buttons disappeared
What to ask the AI
"Add a search bar above the table. Keep the existing status filter buttons -- place the search bar to the left of them on the same row. Do not modify the filter logic."
Symptom
The project is getting too complex and the AI seems confused about what exists
Evidence
The AI is creating duplicate components or referencing files that do not exist
What to ask the AI
"Before making changes, list the current file structure of the src/ directory and describe what each component does. Then add the export feature to the existing PapersTable component."
Symptom
I asked for too much at once and the result is broken
Evidence
I asked for auth + payments + notifications and nothing works
What to ask the AI
"Let's start over on just the authentication piece. Add a login page with email and password fields, a signup page with the same fields plus a name field, and a logout button in the header. Use localStorage for now -- no real backend. Leave payments and notifications for later."

Practice: break it down

Think of a project you want to build. Use this template to plan your chunks:

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 (see Module 11 for deployment steps)

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

TRY ITAfter the AI finishes building your search feature and you've tested it, what two git commands should you run? (type them separated by ' && ')
KNOWLEDGE CHECK

You want to build an app with user profiles, a messaging system, and notification preferences. What is the best approach?

🔍Context windows and long sessions

As mentioned earlier, AI tools have a limited context window. In practice, this means that in a long session with many back-and-forth messages, the AI may start to forget details from the beginning of the conversation. If you notice the AI “forgetting” earlier work or making inconsistent changes, start a new session and let the AI re-read your project files. This is another reason committing between chunks matters: if the AI makes a mistake in chunk 4, you do not lose the good work from chunks 1-3.

Key takeaways

  • Break big projects into small, focused chunks. One feature or one logical group per prompt. The AI handles small tasks much better than large ones.
  • Follow the house-building sequence. Foundation, frame, rooms, finishing, inspection. Each phase builds on the last.
  • Commit between every chunk. Test the result, commit to git, then move to the next chunk. This gives you safe rollback points.
  • When in doubt, go smaller. A prompt that is too small just costs you one extra prompt. A prompt that is too big costs you debugging time and frustration.
  • Iteration is the process, not a failure. Expect to refine each chunk with a follow-up prompt or two. That is normal and fast.