When specifications are vague, ask Claude Code to ask you lots of questions before implementing. This narrows the solution space before any code is written.
The Pattern
Tell Claude Code explicitly:
Before implementing, ask me questions to clarify requirements.
The agent then interviews you about edge cases, preferences, and constraints. Only after gathering answers does it propose or implement a solution.
Why This Works
1. Vague Specs Create Exponential Search Spaces
Vague requirement: "Add a settings page"
Possible interpretations:
- Modal vs full page vs sidebar
- Single form vs tabbed sections
- Auto-save vs explicit save button
- Inline validation vs submit validation
- Dark mode support or not
- Mobile responsive or desktop-only
- ...exponentially more combinations
Each unclarified dimension multiplies possibilities. Questions collapse the space before implementation begins.
2. UI Has Larger Search Spaces Than Backend
Backend work often has clearer constraints:
- API contracts define inputs/outputs
- Database schemas constrain data shapes
- Business logic has deterministic rules
UI work is more open-ended:
- Layout choices are subjective
- Interaction patterns vary widely
- Visual hierarchy has many valid solutions
- User preferences are implicit
Upfront questioning is especially valuable for UI work where the search space is naturally more expansive.
3. Similar to Deep Research Pattern
Deep research tools work by:
- Gathering information about the problem
- Synthesizing context
- Generating output
Upfront questioning applies the same principle:
- Gather requirements through questions
- Synthesize understanding
- Generate implementation
The interview phase is the research phase.
How to Apply
Simple Version
Add to your prompt:
Ask me 5-10 clarifying questions before implementing.
Structured Version
Before implementing, interview me about:
- User goals and workflows
- Edge cases and error states
- Design preferences and constraints
- Integration requirements
- Non-functional requirements (performance, accessibility)
Only proceed after I've answered.
CLAUDE.md Integration
Add to project instructions:
## Implementation Pattern
When requirements are vague, ask clarifying questions before coding.
Focus questions on:
- User intent behind the feature
- Edge cases that need handling
- Design/UX preferences
- Success criteria
When to Use
| Scenario | Use Upfront Questioning? |
|---|---|
| Vague feature request | Yes |
| UI/UX work | Yes |
| New domain you’re unfamiliar with | Yes |
| Clear, well-specified task | No |
| Bug fix with reproduction steps | No |
| Refactoring with defined scope | No |
Example Exchange
User: Add a notifications system to the app.
Claude Code (with pattern):
Before implementing, I have some questions:
- What types of notifications? (system alerts, user actions, reminders)
- In-app only, or email/push as well?
- Should users be able to configure notification preferences?
- Real-time (WebSocket) or polling?
- How long should notifications persist?
- Any grouping/batching of similar notifications?
- What’s the read/unread UX?
User: Just in-app, real-time, user actions only, persist for 7 days, no grouping needed, simple dot indicator for unread.
Claude Code: Now implementing with those constraints…
The search space collapsed from hundreds of combinations to one clear path.
Key Principle
The cost of asking questions is linear. The cost of exploring wrong solutions is exponential. Front-load the questions.
Related
- Cursor Agent Workflows – Plan Mode for complex features
- Highest Leverage Points – Planning as high-leverage activity
- Constraint-First Development – Constraints narrow solution spaces
- Building the Harness – Structured agent interactions

