Intermediate8 min

Prompt Decomposition — Breaking Large Tasks Right

One large prompt that asks Claude to build a complete feature produces mediocre output across every component. The right decomposition pattern — single-objective steps with context handoffs — produces excellent output on each part.

Quick Reference

  • One prompt, one clear objective that Claude can verify
  • Large prompts fail: Claude optimizes for the last instruction
  • Pattern: plan → implement step 1 → verify → implement step 2
  • Context handoff: each step references what was just completed
  • Parallel decomposition: independent tasks run in separate worktree sessions
  • When NOT to decompose: short sequential tasks Claude handles as one

Why Large Prompts Fail

When you ask Claude to build a payment system with Stripe, Google OAuth, email receipts, analytics, and CI/CD in one prompt, you get mediocre output across all areas. The reason: Claude has finite attention in a single context window, and a prompt with 10 objectives diffuses that attention across all 10.

There is also a bias toward the last instruction: Claude tends to optimize for completing the most recently stated objective. The payment system (stated first) gets less attention than CI/CD (stated last).

The single-objective rule

Each prompt should have one clear objective that Claude can verify. Not one task with multiple components — one verifiable outcome. 'Add OAuth login' is one objective. 'Add OAuth login, email confirmation, and user profile page' is three.