Skip to content

fix: create-and-preview-style prompt now defaults to Standard, not streets-v12 - #134

Open
mattpodwysocki wants to merge 1 commit into
mainfrom
fix/create-and-preview-style-default-standard
Open

fix: create-and-preview-style prompt now defaults to Standard, not streets-v12#134
mattpodwysocki wants to merge 1 commit into
mainfrom
fix/create-and-preview-style-default-standard

Conversation

@mattpodwysocki

Copy link
Copy Markdown
Contributor

What changed

create-and-preview-style's base_style fallback and its "Create the map style" step now default to Standard, matching StyleBuilderTool's own long-standing policy ("ALWAYS use 'standard' as the default for all new styles"), instead of hardcoding the Classic streets-v12.

Why

Noticed while checking whether mapbox/mcp-server#248/#250 (switching render_map_tool to Standard, adding base-map restyling) implied any follow-up in this repo. They didn't — StyleBuilderTool and GeojsonPreviewUIResource were already Standard-first — but that check surfaced this prompt as a pre-existing, unrelated straggler that never got updated when StyleBuilderTool adopted its "always default to standard" policy.

It wasn't just the default string that was stale: the prompt's "Create the map style" step told the LLM to use the low-level create_style_tool directly, with a hand-authored example JSON skeleton (sources/layers background fill) hardcoded in the prompt text — a bare Classic-style structure, completely disconnected from the base_style argument (it never referenced it). That example would have been structurally wrong for a Standard-based style regardless of what the default was, since Standard needs the imports/config structure style_builder_tool already knows how to build. So the fix also switches the prompt to the same style_builder_toolcreate_style_tool two-step pattern build-custom-map and other prompts in this repo already use, rather than patching the default string on top of a hand-rolled example that was already wrong.

Verification

  • Added two tests: default resolves to "standard" (not "streets-v12") and references style_builder_tool; an explicit Classic base_style override is still respected.
  • Existing test suite required no changes — none of it asserted step numbers or the old hardcoded JSON.
  • npx tsc --noEmit, npx eslint: clean.
  • Full suite passes (613/613).

🤖 Generated with Claude Code

…reets-v12

StyleBuilderTool has defaulted base_style to "standard" for a while now
("ALWAYS use 'standard' as the default for all new styles"), but this
prompt's own fallback and instructions were never updated to match: it
hardcoded streets-v12 and hand-authored a bare Classic-style JSON skeleton
directly in the prompt text, disconnected from the base_style argument
entirely (it never referenced it, and would have been structurally wrong
for a Standard-based style anyway, since Standard requires the imports/
config structure StyleBuilderTool already knows how to build).

Now defaults to "standard" and delegates style construction to
style_builder_tool, matching the pattern build-custom-map and other
prompts in this repo already use, instead of hand-rolling a Classic-only
skeleton in the prompt text.

Surfaced while reviewing whether mapbox/mcp-server#248/#250 (switching
render_map_tool to Standard, adding base-map restyling) implied any
follow-up here — they didn't (this repo's StyleBuilderTool/GeojsonPreview
were already Standard-first), but the check surfaced this pre-existing,
unrelated inconsistency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mattpodwysocki
mattpodwysocki requested a review from a team as a code owner August 21, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants