Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 21, 2025

The LLM prompt used in the zoneless migration tool to rank component files has been hardened to improve security and reliability.

The new prompt provides more explicit instructions to the LLM by:

  • Clearly defining its specialized role as a code analysis assistant.
  • Using XML tags to separate instructions from the file path data.
  • Explicitly instructing the LLM to treat file paths as literal data and not to interpret them as commands.
  • Adding a heuristic to improve the quality of the ranking.

This change reduces the risk of prompt injection and improves the overall robustness of the tool.

The LLM prompt used in the zoneless migration tool to rank component files has been hardened to improve security and reliability.

The new prompt provides more explicit instructions to the LLM by:
- Clearly defining its specialized role as a code analysis assistant.
- Using XML tags to separate instructions from the file path data.
- Explicitly instructing the LLM to treat file paths as literal data and not to interpret them as commands.
- Adding a heuristic to improve the quality of the ranking.

This change reduces the risk of prompt injection and improves the overall robustness of the tool.
@clydin clydin requested a review from atscott September 21, 2025 14:27
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Sep 21, 2025
@clydin clydin removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 22, 2025
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Sep 22, 2025
@clydin clydin merged commit 57bf4d2 into angular:main Sep 22, 2025
35 checks passed
@clydin clydin deleted the mcp/zoneless-1 branch September 22, 2025 15:26
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 target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants