5.2

Advanced Planning & Research

Breaking down complex features with multi-step research

🔬 Strategy ⏱️ ~25 minutes ⚡ Advanced

Simple features need simple plans. But what about complex features in unfamiliar territory? When you're building something you don't fully understand yet, you need a different approach: research-first planning.

🔬

Research Planning Template

Framework for decomposing complex features

📄 Preview PDF
Download PDF

🤔 When Planning Isn't Enough

You've learned the basic planning step: "Create a plan for X." That works great when:

  • The feature is straightforward
  • You know the technology
  • The approach is obvious

But what about:

  • "Add authentication with OAuth" (you've never done OAuth)
  • "Make this work offline" (service workers? local-first? what?)
  • "Connect to the Salesforce API" (which endpoint? how does auth work?)
  • "Add real-time collaboration" (WebSockets? Server-Sent Events? Firebase?)

✨ The Problem

You can't plan what you don't understand. Before creating an implementation plan, you need a research plan.

🔬 The Research-First Approach

For complex or unfamiliar features, add a research step BEFORE planning:

Enhanced Planning Process

Step 1: RESEARCH - Understand the problem space, explore options
Step 2: DECIDE - Choose an approach based on research
Step 3: PLAN - Create detailed implementation plan
Step 4: BUILD - Execute the plan

📖 Complete Example: Adding OAuth

Let's watch research-first planning in action:

Task: Add "Sign in with Google" to a to-do app
Challenge: Never implemented OAuth before

Step 1: RESEARCH (10 minutes)

Prompt: "I want to add 'Sign in with Google' OAuth to my to-do list app. Before creating an implementation plan, research and explain:
1. What OAuth is and how it works conceptually
2. What I need from Google (credentials, setup)
3. What options exist for implementing it (libraries, approaches)
4. What the simplest approach would be for a static web app

Give me a research summary, not a plan yet."

Claude researches and explains:
• OAuth basics (redirect flow, tokens)
• Need Google Cloud Project + OAuth credentials
• Options: google-auth-library, firebase-auth, or raw OAuth flow
• For static app: Use Firebase Auth (simplest) or Google Identity Services
• Recommendation: Google Identity Services (newest, simplest)

User now understands the landscape

Step 2: DECIDE (2 minutes)

Prompt: "Based on your research, I'll use Google Identity Services. What are the tradeoffs?"

Claude explains:
• Pros: Simplest setup, maintained by Google, works for static sites
• Cons: Less control than OAuth library, Google-only (not generic OAuth)
• Good choice for this use case

Decision made with confidence

Step 3: PLAN (5 minutes)

Prompt: "Now create a step-by-step implementation plan for adding Google Sign-In using Google Identity Services."

Claude creates detailed plan:
1. Get credentials from Google Cloud Console
2. Add Google Identity Services script to HTML
3. Create sign-in button
4. Handle sign-in callback
5. Store user info in localStorage
6. Add sign-out functionality
7. Update UI to show signed-in state

Clear roadmap ready to execute

Step 4: BUILD (30 minutes)

Prompt: "Let's implement step 1: getting credentials."

Claude guides through Google Cloud Console setup.
Then implements each step incrementally.
User tests after each step.

Result: Working Google Sign-In

✅ Why This Worked

Research phase explored options WITHOUT committing to code. Decision phase chose approach with eyes open. Plan phase provided clear steps. Build phase executed confidently.

🎯 Research Prompting Patterns

Effective research prompts have a structure:

"I want to [accomplish goal]. Before planning implementation, research: 1. What is [technology/concept] and how does it work? 2. What are my options for implementing this? 3. What are the tradeoffs of each approach? 4. What's the simplest approach for [my constraints]? 5. What pitfalls should I watch for? Give me a research summary to inform my decision."

⚡ Pro Tip: Separate Research from Implementation

Explicitly say "research only, don't write code yet." This keeps Claude in exploration mode rather than jumping to implementation.

📊 Simple vs. Complex Features

Simple (Plan → Build) Complex (Research → Decide → Plan → Build)
Add a delete button Add OAuth authentication
Change button colors Make app work offline
Add a new field to form Connect to external API
Display data in a table Add real-time sync

🔍 Using Web Search in Research

Claude Code has web search. Use it during research:

"Research current best practices for [technology]. Search for: - Recent tutorials or guides - Common pitfalls or gotchas - Recommended libraries or tools - What's changed in the last year Summarize what you find."

When to use web search:

  • New or rapidly-changing technologies
  • Finding current library versions
  • Checking if an approach is still recommended
  • Learning about breaking changes

🧩 Decomposition Strategies

Breaking complex features into pieces:

🎯 Feature Decomposition Framework

Identify the MVP:
What's the absolute simplest version that proves the concept?
Example: OAuth → Just show "signed in as [name]" first
List dependencies:
What external things do you need? (APIs, credentials, libraries)
Example: OAuth → Google Cloud Project, client ID, redirect URI
Map the data flow:
Where does data come from? Where does it go?
Example: OAuth → Google → token → localStorage → UI
Identify decision points:
Where do you have choices to make?
Example: OAuth → Which library? Where to store tokens? How long valid?
Break into phases:
What can you build and test independently?
Phase 1: Sign in. Phase 2: Sign out. Phase 3: Persist across sessions.

⚠️ Research Anti-Patterns

❌ Research paralysis

Researching for 2 hours without deciding. Set a time limit: 15-20 minutes of research, then decide and move forward.

❌ Premature implementation

"Just start coding and figure it out" leads to rewrites. Spend 15 minutes researching to save 2 hours rebuilding.

❌ Analysis without synthesis

Research that doesn't lead to a clear recommendation. Always end research with: "Based on this, I recommend..."

📋 Research Checklist

Before moving from research to planning, verify:

Research Complete When:

You understand what the technology/approach IS
You know what your options are (2-3 approaches identified)
You understand tradeoffs of each option
You have a recommendation for which approach to use
You know what external dependencies you need
You're aware of common pitfalls

🎯 Practice: Your Research Prompt

Think of a complex feature you want to build:

🎯 Write a Research Prompt

Choose your complex feature:
What do you want to build but don't fully understand how?
Pick something genuinely unfamiliar, not just "add a button."
Draft your research prompt:
Use the pattern: "I want to [goal]. Before planning, research: 1) What is it? 2) What are my options? 3) What are tradeoffs? 4) What's simplest for [constraints]?"
Actually run it:
If you have Claude Code available, try the prompt. See what research comes back.
Evaluate the research:
Did you learn what you needed? Can you now make an informed decision? If not, refine the prompt and try again.

📚 Resources & Further Learning

💭 Pause & Reflect

Before moving on, take a moment to consider:

  • Can you think of a time when jumping straight to building caused problems?
  • What features have you avoided because they seemed too complex to understand?
  • How would a research phase change your confidence tackling unfamiliar technology?

🎯 Advanced Planning Mastered

You can now tackle complex features with confidence. Next: Specialized AI agents for different tasks.

Topic 5.2 Complete • Up Next: 5.3 – Working with Subagents