Skip to content

Comments

feat(brainstorming): Smart question batching, visual previews, alternative surfacing#520

Open
SebRogala wants to merge 3 commits intoobra:mainfrom
SebRogala:feat/smart-question-batching
Open

feat(brainstorming): Smart question batching, visual previews, alternative surfacing#520
SebRogala wants to merge 3 commits intoobra:mainfrom
SebRogala:feat/smart-question-batching

Conversation

@SebRogala
Copy link

@SebRogala SebRogala commented Feb 21, 2026

Improve the brainstorming skill's clarifying questions phase with smart batching, visual previews, and alternative surfacing.

Motivation and Context

When brainstorming a feature with 6+ questions, the current "one question at a time" approach creates excessive round-trips. Additionally, layout/UI questions use text-only descriptions ("Full-width stacked" vs "Two-column") when the AskUserQuestion tool already supports markdown previews for ASCII mockups. Finally, questions with ambiguous concepts (e.g., "reference ID" vs "payment method") don't always surface the alternatives as choosable options.

How Has This Been Tested?

Tested on a Guardian Financial Overview scenario (6 clarifying questions). 3 runs per version (6 total, Sonnet).

Metric Original (3 runs) Improved (3 runs)
Total calls 6, 6, 6 3, 3, 3
Layout mockups Never Always (all 3 runs)
Layout question position Always last Always last
Ambiguity surfaced Yes in all 3 Yes in all 3
Text questions batched Never Always (4 per first call)

Three invariants held across all improved runs:

  1. Always 3 calls (never 6)
  2. Layout always last with markdown preview mockups (never text-only)
  3. Ambiguity always surfaced (ref ID vs payment method explained with 4 options)

The only variance between improved runs was which text questions got batched together — the pattern itself was 100% consistent.

Breaking Changes

None. The skill still produces AskUserQuestion calls with the same schema. Users see fewer interaction rounds and richer visual options.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The diff is minimal — replaces the "one question at a time" bullet points with a "smart batching" section (6 bullet points) and updates Key Principles to match. No structural changes to the rest of the skill.

Example: Layout question output — before vs after

Before (text-only):

{ "label": "Full-width stacked", "description": "All sections stack vertically in a single column" }

After (ASCII mockup in markdown preview):

{
  "label": "Full-width stacked layout",
  "description": "All sections stack vertically in a single column.",
  "markdown": "┌────────────────────────────────────────────┐\n│  ┌──────────┐ ┌──────────┐ ┌──────────┐   │\n│  │ Balance  │ │ Charges  │ │ Payments │   │\n│  └──────────┘ └──────────┘ └──────────┘   │\n│  > Child A — charges by group              │\n│  Transaction history        [Filter v]     │\n│  [Record Payment]  [Record Adjustment]     │\n└────────────────────────────────────────────┘"
}

Summary by CodeRabbit

  • Documentation
    • Reworked brainstorming guidance to use smart batching for clarifying questions instead of one-at-a-time prompts.
    • Updated checklist wording and removed the design-to-implementation transition step.
    • Added guidance on categorizing and ordering text vs visual questions; visual questions handled last and individually with ASCII mockups.
    • Specified batching rules (up to 4 independent text questions per batch), discrete options per question, and revised key principles to emphasize batching.

…ative surfacing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Replaces a one-question-at-a-time clarifying workflow with a smart-batching approach: classify questions as text or visual, ask text questions first in batches (≤4 independent text questions per AskUserQuestion call, multiple batches allowed), then ask visual questions one-at-a-time with ASCII mockups.

Changes

Cohort / File(s) Summary
Brainstorming Skill Guidance
skills/brainstorming/SKILL.md
Replaced one-at-a-time clarifying-question guidance with a new "Asking questions — smart batching" subsection. Added classification of text vs. visual questions, ordering rules (text first, visuals last), batch size limit (≤4 independent text questions per AskUserQuestion call, allow multiple batches), one-at-a-time visual questions with ASCII mockups and discrete options, removed a design-to-implementation transition checklist step, and updated Key Principles and "Understanding the idea" wording to emphasize batching-focused workflow.

Sequence Diagram(s)

sequenceDiagram
  participant Agent as Brainstorming Skill
  participant User as User
  participant API as AskUserQuestion API
  participant Renderer as ASCII Preview Renderer

  Agent->>Agent: Classify clarifying questions\n(text vs visual)
  Agent->>API: Send batch of up to 4 text questions
  API->>User: Present batched text questions
  User-->>API: Respond to batch
  API-->>Agent: Return responses
  Agent->>Agent: If more text questions -> repeat batch
  Agent->>Renderer: Prepare ASCII mockup for next visual question
  Renderer->>User: Show ASCII preview (one visual question)
  User-->>Agent: Respond to visual question
  Agent->>Agent: Continue visual questions one-at-a-time until done
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 I nibble queries, batch by batch,
Four little carrots in one small latch.
Then sketches follow, one at a time,
ASCII hops and cadence rhyme.
A rabbit's brainstorm, neat and spry.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: smart question batching, visual previews, and alternative surfacing—all core features described in the raw summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
skills/brainstorming/SKILL.md (1)

69-69: Optional: replace ALL CAPS with bold for consistent emphasis style

Every other emphasis in this document uses **bold**; ALL CAPS is an outlier.

✏️ Proposed fix
-  - Ask visual questions ONE AT A TIME, using the `markdown` preview field on each option for ASCII mockups
+  - Ask visual questions **one at a time**, using the `markdown` preview field on each option for ASCII mockups
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/brainstorming/SKILL.md` at line 69, Replace the ALL CAPS emphasis in
the line "Ask visual questions ONE AT A TIME, using the `markdown` preview field
on each option for ASCII mockups" with the document's standard bold style; edit
that string in SKILL.md and change "ONE AT A TIME" to a bolded phrase (e.g.,
**one at a time**) so emphasis uses **bold** instead of ALL CAPS for
consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/brainstorming/SKILL.md`:
- Line 62: Replace the phrase "multiple choice questions" with the hyphenated
compound adjective "multiple-choice questions" in SKILL.md (look for the exact
string "Prefer multiple choice questions when possible, but open-ended is fine
too") so the compound modifier preceding the noun is grammatically correct.
- Line 100: The bold phrase "**Multiple choice preferred**" in SKILL.md should
use the same hyphenation as the earlier instance — change it to
"**Multiple-choice preferred**" to be consistent; update the bold text in that
list item and scan for other occurrences of "Multiple choice" to normalize to
"Multiple-choice" where used in headings or list items (look for the bolded list
entry and other list entries around lines with the multiple-choice guidance).
- Line 97: The summary line "Batch independent questions — up to 4 per
AskUserQuestion call, multiple batches if needed" is ambiguous; update it to
match the concrete threshold used earlier ("if more than 4") by changing the
trailing phrase to something explicit like "multiple batches if more than 4
questions need asking" (referencing the "Batch independent questions" heading
and the earlier trigger on line 67) so the principle clearly specifies when
batching occurs.

---

Nitpick comments:
In `@skills/brainstorming/SKILL.md`:
- Line 69: Replace the ALL CAPS emphasis in the line "Ask visual questions ONE
AT A TIME, using the `markdown` preview field on each option for ASCII mockups"
with the document's standard bold style; edit that string in SKILL.md and change
"ONE AT A TIME" to a bolded phrase (e.g., **one at a time**) so emphasis uses
**bold** instead of ALL CAPS for consistency.

- multiple choice → multiple-choice (compound adjective hyphenation)
- ONE AT A TIME → **one at a time** (bold instead of ALL CAPS)
- "if needed" → "if more than 4" (match concrete threshold)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/brainstorming/SKILL.md`:
- Around line 97-98: Update the Key Principles wording to make it explicit that
the 4-per-AskUserQuestion limit applies only to text questions: change "Batch
independent questions — up to 4 per AskUserQuestion call, multiple batches if
more than 4" to explicitly say "Batch independent text questions — up to 4 per
AskUserQuestion call, multiple batches if more than 4", keeping the existing
"Visual questions last, one at a time — use `markdown` preview field for ASCII
mockups" line intact so the distinction between AskUserQuestion text batching
and single visual questions is unambiguous.

"Batch independent questions" → "Batch independent text questions"
to avoid ambiguity with the one-at-a-time visual question rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@obra obra added enhancement New feature or request claude-code Claude Code (Anthropic CLI) issues labels Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code Claude Code (Anthropic CLI) issues enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants