Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Oct 17, 2025

Introduces a version-aware mechanism for the get_best_practices MCP tool to solve the version-mismatch problem where the AI could provide guidance for a different version of Angular than what the user's project has installed.

The tool now accepts a workspacePath to locate the project's installed @angular/core package. It reads a new angular metadata property from the framework's package.json to find the path to a version-specific best-practices.md file co-located within the framework package itself.

This change ensures the AI assistant's guidance is perfectly aligned with the project's actual framework version, dramatically increasing its accuracy and reliability.

If a version-specific guide cannot be resolved, the tool gracefully falls back to the generic guide bundled with the CLI to ensure backward compatibility. The core MCP server instructions are also updated to guide the AI on the new workflow.

@clydin clydin added the target: major This PR is targeted for the next major release label Oct 17, 2025
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/cli labels Oct 17, 2025
Introduces a version-aware mechanism for the `get_best_practices` MCP tool to solve the version-mismatch problem where the AI could provide guidance for a different version of Angular than what the user's project has installed.

The tool now accepts a `workspacePath` to locate the project's installed `@angular/core` package. It reads a new `angular` metadata property from the framework's `package.json` to find the path to a version-specific `best-practices.md` file co-located within the framework package itself.

This change ensures the AI assistant's guidance is perfectly aligned with the project's actual framework version, dramatically increasing its accuracy and reliability.

If a version-specific guide cannot be resolved, the tool gracefully falls back to the generic guide bundled with the CLI to ensure backward compatibility. The core MCP server instructions are also updated to guide the AI on the new workflow.
@clydin clydin force-pushed the mcp/best-practices-version-aware branch from b8a7062 to 898c3ff Compare October 20, 2025 14:57
@clydin clydin marked this pull request as ready for review October 20, 2025 14:57
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 21, 2025
@clydin clydin requested a review from alan-agius4 October 21, 2025 00:00
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 21, 2025
@clydin clydin merged commit 68e7113 into angular:main Oct 21, 2025
34 checks passed
@clydin clydin deleted the mcp/best-practices-version-aware branch October 21, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants