Skip to content

Prompt Expansion

The Expand checkbox in the chat panel turns a one-line prompt into a detailed multi-paragraph spec, then generates from the detailed version. Results are more polished and feature-complete at the cost of one extra short AI call.

When to use it

Turn Expand ON when your prompt is vague or you want the AI to make reasonable decisions about features you didn't specify.

Example:

  • Prompt: "make a timer"
  • Expand off: AI generates a basic countdown timer with a start button. ~100 lines.
  • Expand on: AI first specs out — "countdown timer with hours/minutes/seconds input, start/pause/reset, audio alarm on completion, dark theme, full keyboard navigation" — then generates a timer with all of that. ~300 lines.

Turn Expand OFF when your prompt is already specific or you want minimal code.

Example:

  • Prompt: "add a clear button next to the search field that resets the query"
  • Expand here would over-engineer a simple edit. Leave it off.

How it works

  1. You write a short prompt and click Generate
  2. If Expand is on, Whittl sends your prompt + an "expand this into a detailed spec" system prompt to the AI
  3. AI returns a 5-20 line spec
  4. Whittl uses that spec (not your original prompt) as the input to the main generation

The expansion pass is cheap — short text-only and fits in prompt caching. Typical cost on Claude Sonnet: ~$0.001-$0.003. On free-tier Gemini: zero.

Where the setting lives

  • Per-request toggle: the checkbox in the chat panel. Overrides the default for this generation.
  • Default: Preferences → Generation → Enable Prompt Expansion. Default: ON.

Turn the default off if you want minimal-code generation and are happy writing detailed prompts yourself.

Combining with Think mode

Expand and Think stack:

  • Expand rewrites your prompt into a detailed spec
  • Think mode makes the AI reason explicitly about the detailed spec before writing code
  • Best quality, highest cost

On hard problems (algorithmic challenges, complex UI state machines, integration tasks), the combination is the sharpest tool Whittl offers. Use it on the hard 5% of generations, not the routine 95%.

What Expand doesn't do

  • Doesn't change what files get sent. Smart Routing runs independently.
  • Doesn't affect autofix. The auto-fix cycle operates on the generated code, not the expanded spec.
  • Doesn't persist the expanded spec anywhere. You only see your original prompt in chat history.

If you want to see the expanded spec, Preferences → Generation → Show Expanded Prompts in Chat reveals it as a collapsible block above the generation.

What's next