Skip to content

feat(rules): add component resolution rules to webflow_guide_tool#120

Open
kiratchhina wants to merge 2 commits intomainfrom
kirat-pm/component-resolution-rules
Open

feat(rules): add component resolution rules to webflow_guide_tool#120
kiratchhina wants to merge 2 commits intomainfrom
kirat-pm/component-resolution-rules

Conversation

@kiratchhina
Copy link
Copy Markdown
Collaborator

@kiratchhina kiratchhina commented Apr 15, 2026

JIRA ISSUE: https://webflow.atlassian.net/browse/DEVPL-4172

Summary

  • Added comprehensive component resolution rules to prevent name collision issues when inserting components
  • Introduced session audit rules to detect unintentional component creation
  • Ensures users are always warned before proceeding with ambiguous component names

Key Changes

  • Added "Component Resolution Rules" section requiring list_components call before every component_builder usage
  • Defined resolution priority: explicit ID → unambiguous readonly match → ambiguous match warning → no readonly match warning
  • Added "Component Session Audit Rules" for before/after comparison of component lists to catch accidental site-level component creation
  • Provides structured warning format for ambiguous component names
  • Requires logging of which resolution path was taken for transparency

Test plan

  • Verify component_builder workflows now check for name collisions
  • Test ambiguous name warning appears when shared library and site-level components have same name
  • Confirm session audit detects new site-level components after insertion
  • Validate resolution priority order is followed correctly

🤖 Generated with Claude Code

kiratchhina and others added 2 commits April 8, 2026 15:33
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
Simplified the component resolution rules based on the fact that component_builder only accepts component names (not IDs). Reduced from complex multi-step priority ordering and session audit rules to 4 concise guidelines:

- Check for name collisions before using component_builder
- Warn user when multiple components share the same name
- Default to shared library version (readonly: true)
- Provide simple warning format

Also restored the important note that component_schema takes names, not IDs.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@kiratchhina kiratchhina marked this pull request as ready for review April 15, 2026 21:41
@kiratchhina kiratchhina requested a review from a team as a code owner April 15, 2026 21:41
@kiratchhina kiratchhina requested review from morganthrapp and removed request for a team April 15, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants