Skip to main content

Scaling Decomposition Thinking: From 3 to 5+ Features

You've done something remarkable. Over the past four lessons, you've mastered coordinating multiple AI agents in parallel, using specifications as your communication tool. You took a complex project, decomposed it into independent features, assigned each to an agent, and brought them together in a coherent whole—all without a single synchronous meeting.

That's team leadership.

You've proven you can coordinate parallel work. Now comes the harder question: How far does that ability scale?

This is the FIRST CLIMAX—not just managing more work, but understanding the fundamental principles that determine whether decomposition thinking scales or collapses under its own weight.


Analyzing Your 3-Feature Decomposition

Let's start by examining what you've actually built. Before scaling, you need to understand what made your 3-feature workflow succeed or struggle.

Retrospective: What Worked? What Was Hard?

Pull up your git worktrees, your specs, and your integration test results. Ask yourself honestly:

What went well:

  • Did your features integrate with minimal merge conflicts?
  • Were your APIs stable, or did you need to redesign them during integration?
  • Could each agent work independently, or did they frequently block waiting for each other?
  • How much coordination happened asynchronously (through specs and PRs) vs synchronously (asking for clarification)?

What was difficult:

  • Did you find yourself updating shared code that multiple features touched?
  • Were there any hidden dependencies between features that surprised you?
  • Did one feature take 3x longer than others, becoming a bottleneck?
  • How many times did you need to rework specs because contracts were unclear?

Measuring Your Decomposition Quality

Use this rubric to rate your 3-feature system honestly (1 = poor, 5 = excellent):

AspectYour ScoreWhat It Means
Feature Independence___ / 5Can features be built with zero coordination between agents?
Specification Clarity___ / 5Could an agent implement your spec without asking clarifying questions?
Integration Contract Stability___ / 5Did the contracts between features remain stable throughout implementation, or did they require rework?
Merge Conflict Frequency___ / 5How clean was integration? (5 = zero conflicts, 1 = multiple conflict resolution rounds)
Testing Coverage___ / 5Could you validate the whole system without manually testing each feature in isolation?
Dependency Clarity___ / 5Were all dependencies between features explicit in your specs, or did you discover implicit ones?
Communication Efficiency___ / 5How much async (spec-based) vs sync (meeting-based) coordination did you need?

Scoring Guide:

  • 18-35: Your decomposition works, but has friction. Scaling to 5+ will highlight these issues.
  • 18-35: Solid foundation. You're ready to identify and fix your weak points.
  • 29-35: Strong decomposition thinking. You're well-prepared to tackle 5+ features.

Write down your three lowest scores. These are the patterns you need to fix before scaling.

Recording What You Learned

Document one key lesson from each category:

  1. One spec pattern that worked really well: What made this spec clear enough that agents could implement without rework?
  2. One spec pattern that caused problems: What was vague? What did you learn about writing clearer boundaries?
  3. One integration success: How did you design this feature to minimize merge conflicts and dependencies?
  4. One integration challenge: What could you have done differently in the design phase to avoid this?

This reflection isn't busywork—it's the foundation for understanding what scales and what breaks.


What Scales from 3→5 Features

The leap from 3 to 5 features isn't just "more stuff." It's qualitatively different. Some of your patterns will scale beautifully. Others will crumble.

Pattern 1: Tight, Clear Specifications Scale

If your 3-feature specs had tight contracts and clear boundaries, you're in luck: that pattern scales.

What does a tight spec look like?

  • Explicit inputs: "This endpoint accepts (user_id: UUID, page: int) and returns (success: bool, items: List[Item])"
  • Explicit outputs: "You'll store the result in the items table with schema: [columns listed]"
  • Explicit boundaries: "You own authentication. Feature B owns rate limiting. You call Feature B's API, which handles it transparently."
  • Explicit contracts: "When your feature fails, return (success: false, error_code: 'TIMEOUT'). Feature C will retry with exponential backoff."

When your 3-feature system had these, integration was clean. Tightness is what scales.

At 5 features, tight specs become absolutely critical. Here's why: With 5 features, there are 10 possible integration points (you'll see the math in a moment). You cannot afford ambiguity at 10 integration points. Your agents will make different assumptions about every unclear boundary, and integration becomes chaos.

Action: Review your best specs. What made them tight? Replicate that pattern for all 5 features. If you used a template like the SpecKit spec structure, use it consistently for all features.

Pattern 2: Independent Concerns Scale

If you designed features that don't share code, don't modify the same data, and don't depend on each other's internals, that pattern scales.

What does independence look like?

  • No shared code modifications: Feature A and Feature B both need string utilities, but they don't modify shared/string_utils.py together. (Or they have a clear protocol for extensions.)
  • No shared table modifications: Feature A modifies the users table to add a verified field. Feature B doesn't touch the users table. If Feature B needs that field, it reads via Feature A's API.
  • Clear API boundaries: Features communicate only through APIs, not through shared databases, shared memory, or shared code.

At 5 features, this independence becomes your lifeline. If every feature modifies the same shared tables, merges become unpredictable, and testing becomes nearly impossible.

Action: For your 5-feature system, establish an "API-first" policy. Define which tables each feature owns. Require all cross-feature data access to go through APIs, not direct database access.

Pattern 3: Clear APIs Scale

If your 3-feature system had well-documented APIs with clear contracts, you're set up to scale.

Clear API traits:

  • Input validation is explicit (not implicit in the code)
  • Errors have documented status codes
  • Versioning strategy is clear (even if it's just "no breaking changes")
  • Response format is consistent
  • Pagination, filtering, sorting are documented

At 3 features, mediocre APIs might work (teams coordinate around unclear behavior). At 5 features, unclear APIs become bottlenecks. Agents implementing Feature D will make assumptions about Feature A's API that conflict with Feature B's expectations. Integration becomes a three-way merge nightmare.

Action: Write explicit API documentation for each feature's public endpoints. Use a format like OpenAPI or simple JSON schema. When agents integrate, they read the schema, not the code.

Pattern 4: Modular Architecture Scales

If your features were designed as independent modules (clear entry points, contained logic, no sprawl), scaling is feasible.

Modular traits:

  • Each feature has a clear directory structure
  • Logic is organized by concept (not by type—e.g., features/payment/ not models/, controllers/)
  • Dependencies between features are minimal and documented
  • Testing is isolated (can you test Feature A without running Feature B's code?)

At 5 features, poor modularity causes testing nightmares. If all features import from shared utility code that's constantly changing, tests fail mysteriously. If feature directories are scattered across the codebase, agents lose track of boundaries.

Action: For your 5-feature system, enforce directory boundaries. Each feature gets its own folder with clear entry points. Shared code lives in a well-defined shared/ directory with a strict change control policy.


What Breaks at 5+ Features

Not everything scales. Some problems appear at 3 features but become critical at 5+. Some problems are barely noticeable at 5 but absolute chaos at 10.

Problem 1: Cross-Cutting Concerns Become Bottlenecks

"Cross-cutting concerns" are things that affect all features but don't belong to any one feature: authentication, logging, monitoring, rate limiting, error handling.

At 3 features: You can handle this ad-hoc. Each feature implements its own logging. It's not pretty, but it works.

At 5 features: Ad-hoc breaks. If each feature logs differently, your logs are useless. If each feature handles errors differently, you can't monitor the system. You need shared infrastructure.

The problem: The moment you create shared infrastructure, you've created a bottleneck. All 5 features depend on it. If you need to change logging, it affects all features. If the shared service has a bug, all features are broken.

The solution: Design cross-cutting concerns as shared services with clear, stable APIs. Think of them like utilities that individual features call, not like infrastructure that owns their behavior.

Example:

  • Bad: Every feature calls a log() function in shared/logging.py that they've customized. Changes to one feature's logging break others.
  • Better: Create a LogService with a documented API. Features call it the same way. If you need to change logging, you change LogService once.

At 5 features, shared services move from "nice to have" to "necessary." Plan for them from the start.

Problem 2: Implicit Dependencies

At 3 features, you might have gotten away with implicit dependencies. "Oh, Feature B assumes Feature A is running first." It's documented somewhere (maybe), but there's no enforcement.

At 5 features: Implicit dependencies become invisible bugs. Feature B and Feature C both assume Feature A ran first. But what if Feature A and Feature B are being developed in parallel? Feature C's agent doesn't know the order matters. Integration fails mysteriously.

The solution: Make all dependencies explicit. In your spec, write:

dependencies:
- feature_a (version >= 2.0)
- shared_auth_service (any version)

In your code, document why the dependency exists:

from features.auth import authenticate_user  # Required: must validate user before processing

When you integrate, run a dependency analysis: Find all inter-feature dependencies. Look for cycles (Feature A depends on B, B depends on A—this is a design error). Look for depth (if Feature E depends on D, which depends on C, which depends on B, which depends on A—that's brittle).

At 5+ features, circular dependencies are catastrophic. Catch them early.

Problem 3: Configuration Management

At 3 features, you probably configured each feature in its own way. One used environment variables, one used a config file, one had hardcoded values. It worked because there weren't many configs.

At 5 features: Configuration chaos. Each feature needs to know about the others' configuration (database URL, auth endpoint, feature flags). Coordinating 5 different configuration approaches becomes tedious and error-prone.

The solution: Adopt a single configuration strategy. Examples:

  • Centralized config service (all features query one config endpoint)
  • Environment variable standard (all features read from the same environment)
  • Config file format (all features use the same YAML/JSON structure)

Document which configuration values are secrets (should never be in code) and which are runtime configuration.

At 5+ features, clear configuration management saves hours of debugging.

Problem 4: Distributed Debugging

At 3 features, you probably spotted bugs by looking at logs or running a feature in isolation.

At 5 features: A bug might span all 5 features. User reports "I can't submit orders." Is it Feature A (user auth)? Feature B (product lookup)? Feature C (payment)? Feature D (order creation)? Feature E (email notification)? All of the above?

With poor logging, you're blind. With poor structured logging (logs that include feature name, request ID, user ID, error code), debugging takes hours.

The solution: Implement distributed tracing from the start. Use a consistent format:

  • Every request gets a unique ID
  • Every log entry includes the request ID
  • Every feature logs the same information (timestamp, feature name, request ID, action, result)

With this, you can follow a single user request through all 5 features and spot where it failed.

At 5+ features, distributed tracing becomes non-negotiable for operations.


Communication Complexity Analysis

Let's talk about math, because it's the reason scaling suddenly gets hard.

The N-Squared Problem

Fred Brooks identified this in "The Mythical Man-Month" (1975, still true): When you have N agents working on N features, the number of potential coordination points is N×(N-1)/2.

Let's see what that looks like:

3 features:

  A ─── B
\ /
\ /
C

Integration points: 3 (A-B, A-C, B-C)
Formula: 3×2/2 = 3 ✓

Manageable. You can coordinate 3 integration points with specs and async PRs.

5 features:

  A ─── B
├─┬─┬─┤
│ C │
├─┴─┬─┤
D E

Integration points: 10 (A-B, A-C, A-D, A-E, B-C, B-D, B-E, C-D, C-E, D-E)
Formula: 5×4/2 = 10 ✓

Getting complex. You can still coordinate with specs and async communication, but you need discipline. Every feature must have absolutely clear boundaries.

10 features:

[Imaginary 10-feature mesh diagram]

Integration points: 45
Formula: 10×9/2 = 45

Chaos. You cannot manually coordinate 45 integration points. You need clear integration contracts (Lesson 6) and SpecKit orchestration (Lesson 7) to manage autonomous agent coordination at this scale.

15 features:

Integration points: 105
Formula: 15×14/2 = 105

Absolute chaos without automation.

What This Means for You

Here's the insight: Specifications reduce communication complexity by making communication asynchronous.

Instead of:

  • Agent A: "What does your API return?"
  • Agent B: "It returns [talking for 5 minutes]"
  • Agent A: "Wait, what if there's an error?"
  • Agent B: "Oh right, that's [more talking]"

You have:

  • Feature B's spec says: "Endpoint returns (success: bool, items: List[Item]) or (success: false, error_code: 'TIMEOUT')"
  • Agent A reads the spec once and implements accordingly

At 3 features, you can coordinate with specs and the occasional Slack message. At 5 features, you must be disciplined about specs. At 10 features, you need automation to ensure specs are enforced.

The path forward:

  • 3 features: Manual SpecKit Plus (you've done this in Lessons 1-3)
  • 5-7 features: Integration contracts (Lesson 5) + SpecKit orchestration (Lesson 6)
  • Beyond 7: Automation and tooling (explored in Lesson 7 capstone reflection)

Identifying Decomposition Problems Early

Now that you understand what scales and what breaks, let's identify problems in your current system before they explode at 5+ features.

Red Flag 1: One Feature Is Much Larger Than Others

If your 3-feature breakdown was:

  • Feature A: 5 hours
  • Feature B: 6 hours
  • Feature C: 30 minutes

That's a red flag. Feature C isn't really a feature; it's a detail of another feature. And when you scale to 5 features, if one is 2x larger than others, it becomes a bottleneck. Parallel work stops at that feature.

How to fix it: At the spec phase, aim for features that take 3-8 hours each (for a 3-person team). If one feature would take 15+ hours, decompose it further. Split it into two smaller features or identify what's making it complex.

At 5 features: You need even tighter estimates. If one feature is much larger, it will slow down your entire system.

Red Flag 2: Heavy Merge Conflicts

If you had to manually resolve merge conflicts during integration, that indicates poor boundaries.

Merge conflicts happen when two features modify the same code. Why would they?

  1. Shared code that shouldn't exist: Both Feature A and Feature B added utility functions to utils.py. Solution: Each feature owns its own utilities.
  2. Shared table modifications: Both features modified the users table. Solution: One feature owns users, others access via API.
  3. Implicit dependencies: Feature B assumes Feature A will add a certain column to the database. So Feature B adds it too. Solution: Explicit dependencies in specs.

How to fix it: Map your merge conflicts. For each one, identify why they happened. Then redesign the feature boundaries to eliminate the source.

At 5 features: One or two merge conflicts become five or ten. The problem explodes.

Red Flag 3: Circular Dependencies

If Feature A depends on Feature B, and Feature B depends on Feature A, you have a design problem.

Example:

  • Feature A (payments) calls Feature B (receipts) to generate a receipt when payment succeeds
  • Feature B (receipts) calls Feature A (payments) to validate that the payment was successful

This circular dependency means you can't test either feature independently. It means you must deploy both simultaneously. It's brittle and breaks at scale.

How to fix it: Break the cycle. Redesign so one feature calls the other, but not vice versa. Maybe Feature A (payments) emits an event "payment_completed", and Feature B (receipts) listens to that event. No circular dependency.

At 5 features: Every cycle is a nightmare. Find and eliminate them now.

Red Flag 4: Cross-Feature Code Changes

If implementing Feature B required you to modify code in Feature A, that's a boundary problem.

This happened because:

  1. Feature A wasn't designed to be extended
  2. Feature B needed something Feature A should have provided
  3. You didn't follow your own API boundaries

How to fix it: Redesign Feature A's API so Feature B can get what it needs without modifying Feature A's code. Use the Extension pattern: if Feature A needs to be extended, use hooks or plugins, not direct code modifications.

At 5 features: Every feature that requires cross-feature code changes becomes a nightmare to parallelize.

Exercise: Red Flag Analysis

Look at your 3-feature system. Honestly identify:

  1. Which features were much larger than others? Write down why, and how you'd decompose them differently.
  2. Did you have merge conflicts? List each one and the root cause.
  3. Do you have any circular dependencies? Describe how you'd break the cycle.
  4. Did you modify cross-feature code? Which features and why?

This exercise is the most important validation you can do. Your answers tell you exactly what to fix before scaling to 5 features.


Try With AI

You've proven you can coordinate 3 agents. Now test your understanding against 5-agent scenarios and ask Claude Code to help you think strategically about scaling.

Use Claude Code CLI or ChatGPT (if you prefer web chat) for this exercise. Copy the prompts below and paste them into your AI tool of choice.

Prompt 1: Scalability Analysis

Paste this into Claude Code or ChatGPT:

I've successfully decomposed a project into 3 features and coordinated them with AI agents.
Here's my decomposition:

[Paste your 3 features and their specs here]

Now I want to scale this to 5 features. Analyze my current decomposition:
1. Which patterns scale well?
2. What breaks at 5+ features?
3. What shared services would I need to introduce?
4. Are there any hidden circular dependencies?
5. How would I prioritize fixing issues before scaling?

Expected outcome: Claude identifies scaling risks specific to YOUR system and gives concrete recommendations.

Prompt 2: Feature Dependency Analysis

Paste this into Claude Code or ChatGPT:

I want to understand the communication complexity in my system. Here are my 5 planned features:

[Paste feature list and brief descriptions]

Please:
1. Map all the dependencies between features
2. Identify any circular dependencies
3. Calculate the integration complexity (N*(N-1)/2)
4. Suggest which features should have tightly coupled APIs vs. loosely coupled ones
5. Propose a dependency graph that minimizes coupling

Expected outcome: Claude gives you a visual understanding of your system's complexity and suggests specific architectural improvements.

Prompt 3: Scaling Scenario

Paste this into Claude Code or ChatGPT:

Let's think strategically. I want to scale from 5 agents to 10 agents over the next month.

My current decomposition approach is [briefly describe]:
- [Pattern 1]
- [Pattern 2]
- [Pattern 3]

What would need to change:
1. In how I write specifications?
2. In how I test integration?
3. In how I coordinate features?
4. In my tooling and automation?

Be specific about the transition path: 5→7 agents (what needs to happen) vs. 10 agents (what's fundamentally different).

Expected outcome: Claude helps you see the path from where you are to 10-agent scale and the inflection points where manual approaches stop working.

Safety and Verification

As always with AI-generated architecture advice:

  1. Ask clarifying questions: "Why would you decompose it that way?" and "What are the trade-offs?"
  2. Test against your constraints: Does the advice fit your project, team, and timeline?
  3. Verify with real examples: Look up how companies like Stripe, Netflix, or Linux actually solve these problems
  4. Trust but verify: Claude's suggestions are starting points, not gospel. Your judgment as an architect matters

Critical insight: The fact that you can articulate your decomposition well enough to ask Claude for feedback means you're thinking clearly about architecture. That's the real win here.


You've reached the FIRST CLIMAX. You've proven you can coordinate parallel work at meaningful scale. You understand what works, what breaks, and why the path forward requires explicit contracts and orchestration. You're ready for Lesson 6, where contract-based autonomous coordination enables agents to work without constant supervision.