Repository navigation
Conversation
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. 📦 Bundle sizeSize Change: 0 B Total Size: 8.56 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Custom Completer: should allow option selection via keypress event in
|
dfb9a17 to
a41241f
Compare
180d291 to
552a617
Compare
Expose usage guidelines, best practices and migration guides from the Storybook docs (attached component docs plus the standalone docs manifest), and point to them from the tool descriptions and server instructions.
The summary is included in the Storybook docs manifest, so the design system MCP get_guidance tool can list pages with a description.
552a617 to
f409777
Compare
|
@simison I have a local branch in progress that looks at exposing these usage guidelines as part of the existing I ran into some limitations around the inconsistencies with how we "link" these kinds of documents to components, but that's something we can standardize. Edit: I see you mentioned the alternative in #84864 (comment) 😄 |
|
Superseded by #84864 |
Expose usage guidelines, best practices and migration guides from the Storybook docs (attached component docs plus the standalone docs manifest), and point to them from the tool descriptions and server instructions.
Just an initial pass with AI, likely needing refinement.
Related to surfacing patterns #82547
What?
new get_guidancetool. With no argument it lists every page, with its id, title, summary and attached components. With a page id, title or component name (such asButton) it returns the page as markdown.usage-guidelines.mdx, come fromcomponents.json. Standalone pages come frommanifests/docs.json.parse-guidance.tsconverts MDX to markdown. It drops imports,<Meta>and<Canvas>, unwraps<Markdown>{…}</Markdown>blocks, and turns?path=/docs/…links into plain text.get_components,get_component_detailsandget_design_tokensnow point agents toget_guidancefor choosing between similar components, or migrating components.Why?
How?
I'm taking inspiration from Storybook's own MCP, which gave the idea to add a
summaryto<Meta>so that agents can pick a page from a list without reading all of it, and to publish a docs manifest (manifests/docs.json) alongside the components manifest. Storybook marks the docs manifest schema as preview and not yet stable, so it may change.The idea of a separate guidance tool comes from the Visa design system MCP, which pairs component tools with parallel guidelines tools. Muibook Guidelines is another example of a guidelines-focused server.
I also looked at Shopify's Polaris tooling and Google's Material Design MCP for some ideas. Got the idea for the existing tool descriptions and server instructions pointing agents to
get_guidancefrom them.Testing Instructions
WIP
Testing Instructions for Keyboard
Use of AI Tools
yep!