Skip to content

Commit cb8980a

Browse files
committed
refactor(@angular/cli): make ai-tutor description LLM-centric
The previous description for the `ai_tutor` MCP tool was written from a user-centric perspective. This commit refactors the description to be LLM-centric, providing more explicit instructions for the assistant. The new description clarifies that: - The tool's output is a system prompt that reprograms the assistant to adopt the "tutor" persona. - The tool acts as a RAG source, providing a new knowledge base. - The tutor persona supports special commands (e.g., "skip this section"). These changes align with the best practices for MCP tool descriptions and ensure the LLM has the proper context to use the tool effectively.
1 parent c97fffe commit cb8980a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

packages/angular/cli/src/commands/mcp/tools/ai-tutor.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,23 @@ export const AI_TUTOR_TOOL = declareTool({
1515
title: 'Start Angular AI Tutor',
1616
description: `
1717
<Purpose>
18-
Activates the Angular AI Tutor, an interactive guide to building a complete, modern Angular application from the ground up.
19-
The tutor follows a structured curriculum and fosters critical thinking by explaining concepts and providing project-specific exercises.
18+
Loads the core instructions, curriculum, and persona for the Angular AI Tutor.
19+
This tool acts as a RAG (Retrieval-Augmented Generation) source, effectively
20+
reprogramming the assistant to become a specialized Angular tutor by providing it
21+
with a new core identity and knowledge base.
2022
</Purpose>
2123
<Use Cases>
22-
* Start a guided, step-by-step tutorial for learning Angular.
23-
* Resume a previous tutoring session. The tutor will analyze your project files to determine your progress.
24-
* Learn modern Angular patterns and best practices for version 20.
24+
* The user asks to start a guided, step-by-step tutorial for learning Angular (e.g., "teach me Angular," "start the tutorial").
25+
* The user asks to resume a previous tutoring session.
2526
</Use Cases>
2627
<Operational Notes>
27-
* The tutor will guide you through building a "Smart Recipe Box" application.
28-
* You can control the learning experience with commands like "skip this section" or "set my experience level to beginner."
29-
* The tutor has access to your project files and will use them to verify your solutions.
28+
* The text returned by this tool is a new set of instructions and rules for you, the LLM. It is NOT meant to be displayed to the user.
29+
* After invoking this tool, you MUST adopt the persona of the Angular AI Tutor and follow the curriculum provided in the text.
30+
* Be aware that the tutor persona supports special user commands, such as "skip this section," "show the table of contents,"
31+
or "set my experience level to beginner." The curriculum text will provide the full details on how to handle these.
32+
* Your subsequent responses should be governed by these new instructions, leading the user through the "Smart Recipe Box"
33+
application tutorial.
34+
* As the tutor, you will use your other tools to access the user's project files to verify their solutions as instructed by the curriculum.
3035
</Operational Notes>
3136
`,
3237
isReadOnly: true,
@@ -46,7 +51,7 @@ The tutor follows a structured curriculum and fosters critical thinking by expla
4651
type: 'text',
4752
text: aiTutorText,
4853
annotations: {
49-
audience: ['system'],
54+
audience: ['assistant'],
5055
priority: 1.0,
5156
},
5257
},

0 commit comments

Comments
 (0)