Remove all deprecated recipes + update MCP tool guidance - #1400
Merged
Conversation
🦋 Changeset detectedLatest commit: d77bae6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🟢 No design token changes found |
Contributor
🟢 Bundle size report
|
There was a problem hiding this comment.
Pull request overview
Updates the Brand MCP guidance and rule-based validation to better reflect current Primer Brand page-composition guardrails (especially around gridlines, Rivers, CTABanner balance requirements, and tighter root-vs-subcomponent matching).
Changes:
- Expanded page-level composition guidance in
page-design.mdand strengthened page-design tool snapshot tests. - Improved
primer_brand_examplesgoal parsing so generic “page” terms don’t drown out meaningful goals, and added a general-recipe fallback behavior for page goals. - Refined
primer_brand_reviewparsing/rules (root tag detection, new balanced CTABanner rule, narrower raw-form-controls detection) and extended tests to cover recipes too.
Show a summary per file
| File | Description |
|---|---|
| packages/mcp/src/tools/primer-brand-page-design/primer-brand-page-design.test.ts | Adds assertions to lock in the expanded page-design guidance output. |
| packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.ts | Updates examples tool goal parsing and how/when it selects full-page recipes. |
| packages/mcp/src/tools/primer-brand-examples/primer-brand-examples.test.ts | Adds coverage for the “general recipe + goal-specific components” behavior. |
| packages/mcp/src/test-utils/catalog.ts | Adds a CTAForm catalog entry so it can appear in ranked examples/tests. |
| packages/mcp/src/review/rules.ts | Tightens component root-tag matching, adjusts raw form control detection, and adds a balanced CTABanner rule. |
| packages/mcp/src/review/rules.test.ts | Extends rule tests (subcomponent prop validation, River gridline alignment, balanced CTABanner requirement, raw form controls, recipes in canonical examples). |
| packages/mcp/scripts/generate-catalog.mjs | Aligns catalog contradiction detection with the new “root tags only” matching. |
| packages/mcp/content/page-design.md | Rewrites and expands page composition guidance into explicit Do/Don’t + verification checklist. |
| .changeset/clear-pages-compose.md | Publishes the MCP guidance improvements as a patch changeset. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Low
Contributor
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
Contributor
🟢 No unit test coverage changes foundAll components and hooks with tests maintain the same coverage as the main branch. |
danielguillan
approved these changes
Jul 21, 2026
Merged
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
Towards https://github.com/github/brand-experience/issues/248
Takes latest human eval feedback and applies it to the MCP server, specifically the
primer_brand_reviewtool.primer_brand_examplestool a bit too complicated and less precise than we need it to be.List of notable changes:
What should reviewers focus on?
Steps to test:
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: