docs(mcp): make from_brief state how to bind a scene - #595
Merged
Conversation
`from_brief` told the model to "call `create_project` if the user asks for a new project" and nothing else about scene binding, so a brief against an existing project produced mutations with no bound scene. Those apply in memory only — nothing persists and nothing appears in the browser, and the prompt never said so. Name all three ways to bind (`create_project`, `list_scenes` + `load_scene`, `create_house_from_brief`), state the consequence of skipping it, and split the overloaded save/verify sentence out of the binding instruction. The Task section becomes bind / build / finish so the ordering is legible rather than one run-on line. The registered tool description still claimed the prompt "produces a plan of apply_patch calls"; it has produced semantic tool calls for some time. Prompt text only — no runtime behavior changes. Co-authored-by: Srujan Reddy <srujanreddygangireddy@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvages the prompt-text portion of #561 with attribution to @Srujanreddy1234, whose report is what surfaced this.
The gap
from_brief's only guidance about scene binding was conditional on the user's phrasing:A brief that doesn't read as "new project" — "add a garage", "lay out the second floor" — leaves the model with no instruction to bind anything.
packages/mcpthen runs the mutations against an unbound scene, which is a no-op as far as the user can tell: nothing persists, nothing shows up in the browser, and no tool returns an error. The prompt never mentioned that consequence, so the model had no reason to treat binding as a precondition.What changed
create_project(new),list_scenes+load_scene(existing),create_house_from_brief(create and load a starter in one step).list_scenes/load_scenewere never mentioned at all, which is the actual hole — there was no documented path to an existing project.editorUrlsequence into its own line. It was appended to the binding sentence, which made a four-clause instruction out of two unrelated ones.Two tests pin the parts that carry the behavior, since prompt text has no other guard against silently regressing: every binding tool is named, and the consequence sentence is present.
Scope
Prompt strings and one tool description. No runtime change, no tool signature change, no new dependency.
bun run checkclean (1601 files),check-types9/9,packages/mcptests 326 → 328, 0 fail.Relationship to #561
#561 bundled this text with a runtime change to
publishLiveSceneSnapshot(). That runtime change is worth doing but has four open blockers, the load-bearing one being that gating onhasStorebreakspascal-mcp --stdio— the README quick start fails on the firstcreate_wall. I said in review I'd take the text as its own PR so it wouldn't sit behind that work, so here it is.#561 stays open for the runtime fix, which stands on its own merits:
publishLiveSceneSnapshot()returning silently when no scene is bound is a real defect. This PR makes the prompt stop causing the unbound state; it doesn't make the unbound state loud, which is what #561 is for.Note
Low Risk
Prompt and description strings only; no runtime, tool signatures, or persistence behavior changes.
Overview
Updates the
from_briefMCP prompt so models must bind an active scene before any mutations, instead of only mentioningcreate_projectwhen the brief sounds like a “new project.”The preamble now documents all three paths—
create_project,list_scenes+load_scene, andcreate_house_from_brief—and spells out that without binding, edits stay in memory only and never show in the browser. Save/verify/editorUrlguidance is on its own line, and the ## Task section is reordered into bind → build → finish with semantic tools called out. The registered prompt description no longer claims the flow is mainlyapply_patch.Two tests lock in that every binding tool is named and the unbound-scene consequence text remains in
buildFromBriefPrompt.Reviewed by Cursor Bugbot for commit 2d3dbdf. Bugbot is set up for automated code reviews on this repo. Configure here.