User-friendly guide to understanding and using the structured questions framework in Claude MPM.
- Overview
- Fallback Behavior
- When to Use Structured Questions
- Quick Start
- Common Use Cases
- Understanding Question Types
- Troubleshooting
- FAQ
- Related Documentation
Structured questions provide a consistent, type-safe way for Claude MPM agents (especially the PM agent) to gather user preferences and make decisions about project workflows.
What are structured questions?
Instead of agents making assumptions or asking open-ended questions in conversation, structured questions present clear, multiple-choice options that:
- Provide context: Each option explains what it means and its implications
- Enforce consistency: Questions follow a standard format
- Enable validation: Responses are validated before processing
- Support complex workflows: Multiple related questions can be asked together
Key Benefits:
- Better UX: Clear options instead of freeform text
- Fewer mistakes: Validated inputs reduce errors
- Consistent experience: Same question format everywhere
- Context-aware: Questions adapt based on your project state
Questions always work, even when the UI fails!
The structured questions framework includes automatic fallback to text-based questions when the visual question UI (AskUserQuestion tool) is unavailable or broken. This ensures you can always answer questions and make progress, regardless of technical issues.
- No interruptions: Questions work even if Claude Code has bugs
- Same experience: Text-based fallback provides the same options
- Flexible input: Multiple ways to provide answers (see below)
- Automatic detection: System handles fallback transparently
Fallback automatically activates when:
- The
AskUserQuestiontool is unavailable - The tool returns empty or invalid responses
- Technical errors prevent the visual UI from working
You don't need to do anything - the system handles this automatically!
When fallback mode is active, you'll see questions like this:
============================================================
📋 USER INPUT REQUIRED
(AskUserQuestion tool unavailable - using text fallback)
============================================================
=== Question 1 of 2 ===
[PR Strategy] How should we organize the pull requests?
Options:
1. Main-based PRs - Each ticket gets its own PR against main (parallel work)
2. Stacked PRs - PRs build on each other sequentially (ticket-1 → ticket-2 → ticket-3)
Your answer: 1
=== Question 2 of 2 ===
[Draft PRs] Should PRs be created as drafts?
Options:
1. Yes, as drafts - Create PRs in draft mode for early review
2. No, ready for review - Create PRs ready for immediate review
Your answer: Yes, as drafts
You have multiple ways to provide answers in fallback mode:
Option 1: Use numbers
Your answer: 1
Option 2: Use exact label
Your answer: Main-based PRs
Option 3: Use partial match (case-insensitive)
Your answer: main-based
Your answer: stacked
Option 4: Provide custom answer
Your answer: Feature-branch workflow
Comma-separated numbers:
Your answer: 1,2,3
Comma-separated labels:
Your answer: Auth, Search, Analytics
Mixed format:
Your answer: 1, MongoDB, Custom Option
When the visual UI works, you'll see interactive question cards instead:
PR Strategy: How should we organize the pull requests?
○ Main-based PRs - Each ticket gets its own PR against main (parallel work)
○ Stacked PRs - PRs build on each other sequentially (ticket-1 → ticket-2 → ticket-3)
No configuration needed - the system automatically uses the best available method!
Structured questions are ideal when:
- Choosing between defined options: "Should we use main-based or stacked PRs?"
- Gathering workflow preferences: "Create PRs as drafts or ready for review?"
- Making strategic decisions: "Which testing framework should we use?"
- Selecting from multiple features: "Which features should we prioritize?" (multi-select)
- Asking for freeform input: Ticket descriptions, commit messages, etc.
- Only one obvious choice exists: No need to ask if context is clear
- User has already provided the information: Don't ask unnecessarily
- The question requires custom text: Names, URLs, descriptions
When PM needs to know your PR workflow preference:
What You See:
PR Strategy: How should we organize the pull requests?
○ Main-based PRs - Each ticket gets its own PR against main (parallel work)
○ Stacked PRs - PRs build on each other sequentially (ticket-1 → ticket-2 → ticket-3)
Behind the Scenes:
from claude_mpm.templates.questions.pr_strategy import PRWorkflowTemplate
# PM detects you have 3 tickets and asks about strategy
template = PRWorkflowTemplate(num_tickets=3, has_ci=True)
# Generates appropriate questions based on contextWhen initializing a new project:
What You See:
Project Type: What type of project is this?
○ Web Application - Full-stack web app with frontend and backend
○ API Service - REST/GraphQL API backend service
○ CLI Tool - Command-line application
○ Library - Reusable code library/package
Language: Which programming language?
○ Python - Python 3.8+
○ JavaScript/TypeScript - Node.js or browser
○ Go - Go programming language
○ Rust - Systems programming with Rust
Behind the Scenes:
from claude_mpm.templates.questions.project_init import ProjectTypeTemplate
# PM detects new project without existing code
template = ProjectTypeTemplate(existing_files=False)
# Asks both project type and languageWhen: User requests "Create PRs for MPM-101, MPM-102, MPM-103"
Questions Asked:
- PR Strategy: Main-based vs Stacked PRs (only if multiple tickets)
- Draft PRs: Create as drafts or ready for review
- Auto-merge: Enable auto-merge after CI passes (only if CI configured)
Why Context Matters:
- Single ticket → Skip strategy question (only one PR)
- No CI configured → Skip auto-merge question (not applicable)
Example:
# 3 tickets, CI configured
template = PRWorkflowTemplate(num_tickets=3, has_ci=True)
# Asks all 3 questions
# 1 ticket, no CI
template = PRWorkflowTemplate(num_tickets=1, has_ci=False)
# Asks only draft preference questionWhen: User runs /mpm-init or requests "Initialize new project"
Questions Asked:
- Project Type: Web app, API, CLI, library
- Language: Python, JavaScript/TypeScript, Go, Rust
- Testing Framework: pytest, Jest, etc. (language-specific)
- CI/CD: GitHub Actions, GitLab CI, none
Why Context Matters:
- Existing files detected → Skip language question (auto-detected)
- Project type affects framework options (web frameworks for web apps)
Example:
# New project, no existing code
template = ProjectTypeTemplate(existing_files=False)
# Asks both type and language
# Existing Python project
template = ProjectTypeTemplate(
existing_files=True,
detected_language="Python"
)
# Asks only project type (language already detected)When: User requests "Prioritize sprint tickets for MPM-101 through MPM-105"
Questions Asked:
- Dependencies: Handle dependencies sequentially or in parallel
- Execution Strategy: One at a time or parallel (if team size > 1)
- Blockers: How to handle blocked tickets
Why Context Matters:
- Dependencies detected → Ask about dependency strategy
- Team size affects parallel execution options
- Blockers detected → Ask about mitigation strategy
Example:
# 5 tickets, dependencies exist, solo developer
template = TicketPrioritizationTemplate(
num_tickets=5,
has_dependencies=True,
team_size=1
)
# Asks about dependencies, execution order
# Skips parallel execution (solo developer)When: Creating user-facing production feature
Questions Asked:
- Testing Level: Comprehensive, standard, or basic testing
- Documentation: Full docs, API docs only, or inline comments
- Code Review: Required reviewers and approval threshold
Why Context Matters:
- Production → Higher testing requirements
- User-facing → Documentation more important
- Internal tool → Lighter requirements acceptable
Example:
# User-facing production feature
template = TicketScopeTemplate(
ticket_type="feature",
is_user_facing=True,
project_maturity="production"
)
# Suggests comprehensive testing, full documentation
# Internal development tool
template = TicketScopeTemplate(
ticket_type="feature",
is_user_facing=False,
project_maturity="development"
)
# Suggests standard testing, API docs onlyMost questions allow selecting ONE option:
Testing: Which testing framework should we use?
○ pytest - Python's most popular testing framework
● unittest - Python's built-in testing framework ← Selected
○ nose2 - Extends unittest with plugins
Some questions allow selecting MULTIPLE options:
Features: Which features should we prioritize? (Select all that apply)
☑ Authentication - User authentication and authorization
☐ Search - Full-text search functionality
☑ Analytics - Usage analytics and reporting
☑ Export - Data export in multiple formats
Use cases for multi-select:
- Selecting multiple features to implement
- Choosing multiple testing strategies
- Picking multiple deployment targets
Each question has a short header (max 12 characters) displayed as a tag/chip:
PR Strategy: How should we organize the pull requests?
^^^^^^^^^^^
Header (identifies the question)
Headers are used to:
- Quickly identify questions
- Reference answers (e.g.,
answers.get("PR Strategy")) - Group related questions
Every option includes a description explaining what it means:
○ Main-based PRs - Each ticket gets its own PR against main (parallel work)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Description (explains implications)
Good descriptions:
- Explain what the option means: "Test-driven development with tests first"
- Clarify implications: "PRs merge automatically after CI passes and approval"
- Highlight trade-offs: "Slower setup but more flexibility"
Symptom: PM asks about CI auto-merge but you don't have CI configured
Cause: PM incorrectly detected CI configuration
Solution:
- Verify CI detection: Check if
.github/workflows/or.gitlab-ci.ymlexists - Provide feedback: "We don't have CI configured yet"
- PM will adjust questions for future interactions
Symptom: PM asks about PR strategy every time you create PRs
Cause: Preferences aren't being persisted (feature limitation)
Workaround:
- Answer questions consistently
- Future enhancement: Preference persistence planned
Symptom: Selected wrong option, want to change answer
Solution:
- Let PM know: "Actually, I prefer stacked PRs instead"
- PM can re-ask the question if needed
- Or PM can proceed with your corrected preference
Symptom: Standard templates don't cover your specific workflow
Solution:
- Request custom questions: "Can we add an option for feature-branch workflow?"
- Provide freeform guidance: "Use feature branches with team review"
- Developer: Create custom template (see Integration Guide)
A: Most questions have default behavior if not answered. However, critical questions (like PR strategy with multiple tickets) should be answered for best results.
A: PM analyzes context (number of tickets, CI configuration, project type, etc.) and only asks relevant questions. See Template Catalog for details.
A: Yes! Each question includes an "Other" option where you can provide custom text. PM will use your custom input.
A: PM will incorporate your custom input into its decision-making. For example, if you specify "rebase-merge workflow", PM will use that instead of standard options.
A: Yes! Related questions are grouped together (up to 4 questions at once) to minimize interruptions.
A: For multi-select questions, you can check multiple options. All selected options will be used (e.g., selecting "Auth", "Search", "Analytics" will create tickets for all three features).
A: Currently, answers are session-specific. Future enhancement: Persistent user preferences planned.
A: Not directly, but question sets are predictable based on context. See Template Catalog for examples.
A: The system automatically falls back to text-based questions! You'll see questions in your terminal/console and can answer using numbers, labels, or custom text. See Fallback Behavior for details.
A: You'll see a banner at the top of questions: "AskUserQuestion tool unavailable - using text fallback". The questions work the same way - just with text input instead of visual selection.
A: Fallback mode is automatic and cannot be manually controlled. It only activates when the visual UI fails. This ensures maximum reliability.
- FAQ - General Claude MPM frequently asked questions
- User Guide - Complete user documentation
- Troubleshooting - Common issues and solutions
- Integration Guide - Add structured questions to custom agents
- API Reference - Complete API documentation
- Template Catalog - Available question templates
- Design Document - Architecture and design decisions
- Template Examples - Code examples and integration patterns
Quick Tip: Questions are designed to be context-aware. The more context PM has (number of tickets, project type, CI configuration), the more relevant the questions will be!