Decomposition — Test Your Understanding

Answer each question by producing decomposition trees, dependency maps, and/or build orders. No code. Show your reasoning.


Section A: Decompose It

Question 1

"We need a system for a veterinary clinic."

Clients bring their pets for appointments. The vet records diagnoses and prescribes treatments. The clinic sends appointment reminders. Clients pay for visits.

Produce a complete decomposition tree. Go at least three levels deep. Identify the leaves and verify that each one could have a contract written for it.


Question 2

"Build a recipe sharing platform."

Users create recipes with ingredients and steps. Other users can search, save favorites, and leave reviews. Users can create weekly meal plans and generate shopping lists from their meal plans.

Decompose this top-down. Then identify the dependencies between your leaves. What is the build order?


Question 3

You're in a bottom-up situation. You already have:

  • A user authentication service
  • A file storage service (can store and retrieve files)
  • An email sending service
  • A database for structured data

A client asks: "Can you build me a simple document collaboration tool where teams can upload, share, and comment on documents?"

Using the existing services as your starting point, decompose what needs to be built (not what already exists). Show how the new pieces connect to the existing services.


Section B: Find the Seams

Question 4

A single feature request reads:

"When a customer completes a purchase, they should see an order confirmation page, receive a confirmation email, the inventory should be updated, the sales team should see the order in their dashboard, and if the order is over $500, it should be flagged for manual review."

Find every seam in this description. Group the pieces by the boundary they belong to. Show which pieces can happen in parallel and which must happen in sequence.


Question 5

Here is a vague feature request:

"We need analytics."

Write the 10 questions you would ask to decompose this. For each question, explain why the answer matters for decomposition (i.e., how does it change the shape of the tree?).


Question 6

A system currently works as follows:

  1. User uploads a CSV file
  2. System parses the CSV
  3. System validates each row
  4. Valid rows are saved to the database
  5. Invalid rows are collected into an error report
  6. Error report is emailed to the user
  7. A summary is displayed on screen

Map the seams. Then answer: if step 3 (validation) needs to become much more complex (adding cross-row validation, checking against external data sources), which seams help you isolate that change? Which other steps would be affected?


Section C: Dependencies and Ordering

Question 7

You've decomposed a project into these pieces:

  • A: User registration
  • B: User login
  • C: Create a post
  • D: View feed (list of posts from followed users)
  • E: Follow/unfollow other users
  • F: Like a post
  • G: Notification when someone likes your post
  • H: User profile page

Map all the dependencies (which pieces need which other pieces to exist first). Draw the dependency graph. Determine the build order — what gets built in phase 1, phase 2, etc.?


Question 8

You have a dependency problem. You've identified:

  • Module X needs data from Module Y
  • Module Y needs a callback from Module X when processing is done
  • This creates a circular dependency

Without knowing any specifics about what X and Y do, describe three general strategies for breaking a circular dependency. For each strategy, explain the tradeoff.


Question 9

A project has 12 decomposed tasks. Here are their dependencies:

TaskDepends On
Anothing
Bnothing
CA
DA
EB
FC, E
GD
HF
IF, G
JH
KI
LJ, K

Draw the dependency graph. What is the critical path (the longest chain of dependencies from start to finish)? If you had two people working in parallel, what's the most efficient assignment of tasks to people?


Section D: Critical Thinking

Question 10

"You should decompose until every leaf takes less than a day to build."

Is this good advice? When is it right? When might it be wrong? What are the risks of decomposing too finely versus too coarsely?


Question 11

You're decomposing a system and you encounter a feature that feels like it could belong in two different branches of your tree:

"Send a notification when an order ships."

Is this part of Orders (since it's triggered by an order event)? Or part of Notifications (since it's a notification)? Both feel reasonable.

How do you resolve this? Propose a decomposition that handles this cleanly. Explain the principle behind your decision.


Question 12

You've been given a completed decomposition tree by a colleague. How do you evaluate it? Create a checklist of at least 8 specific questions you would ask to determine if the decomposition is good, complete, and buildable. For each question, explain what a bad answer would reveal.


Grading Rubric

CriteriaWhat It Means
DepthTrees go deep enough that leaves are concrete and estimable — but not so deep that they describe implementation
CompletenessNo missing steps. Trace the user journey and confirm every step has a corresponding leaf
No overlapEach responsibility appears exactly once in the tree
Dependencies are explicitClear arrows showing what needs what. No hidden assumptions
Build order is logicalFoundation pieces first, dependent pieces after. Circular dependencies identified and resolved
Seam recognitionNatural break points are identified and used to structure the decomposition