feat(rules): add component resolution rules to webflow_guide_tool#111
Draft
kiratchhina wants to merge 1 commit intomainfrom
Draft
feat(rules): add component resolution rules to webflow_guide_tool#111kiratchhina wants to merge 1 commit intomainfrom
kiratchhina wants to merge 1 commit intomainfrom
Conversation
When a site consumes shared library components, list_components returns duplicate names — one readonly (shared library) and one site-level. component_builder historically resolved by name and silently picked the site-level version, disconnecting instances from upstream design system updates. This adds explicit resolution rules to the webflow_guide_tool: - Require list_components before every component_builder call - Prefer readonly: true entries; use explicit IDs where possible - Warn and require confirmation on any name collision - Mandate a pre/post session audit to detect implicit component creation Also removes the old "Pass the component name (not the ID)" instruction which was actively contradicting safe resolution behaviour. Made-with: Cursor
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.
Summary
When a Webflow site consumes components from a shared library,
list_componentsreturns two entries for the same component name — one withreadonly: true(shared library) and one site-level.component_builderpreviously resolved by name and silently picked the site-level version, which disconnects placed instances from upstream design system updates.This PR encodes the correct resolution behaviour directly into the
webflow_guide_toolruntime instructions so that any agent using this MCP server follows safe defaults automatically.What's different
list_componentscall before everycomponent_builderinsertionHow it works
All rules live in
webflow_guide_tool(src/tools/rules.ts), which agents are already instructed to call first before all other tools. No schema or API changes — this is purely behavioural guidance.QA Spec
list_componentsbeforecomponent_builderon a site with shared library componentsreadonly: trueentry when a name collision existsMade with Cursor