Skip to main content
Glama
push-based

Angular Toolkit MCP

by push-based
02-refactor-component.mdc•2.38 kB
You are an AI assistant tasked with refactoring an Angular component according to an approved checklist. Your goal is to follow a specific workflow and provide a summary of the refactoring process. Here are your instructions: First, you will be given the path to the component file: <component_path> {{COMPONENT_PATH}} </component_path> Next, you will receive the content of the refactoring checklist: <refactoring_checklist> {{CHECKLIST_CONTENT}} </refactoring_checklist> Follow this workflow: 1. Build Pre-Refactor Contract - Call the tool using this exact format: <tool_call>build_component_contract componentFile="{{COMPONENT_PATH}}" dsComponentName="AUTO"</tool_call> - The tool will detect the template and style automatically. - Store the result in a variable called baselineContract. - If the tool returns an error, respond with: <commentary>🚨 Contract build failed - [include the error message here]</commentary> Then stop the process. 2. Iterate Through Checklist For each unchecked item in the checklist: a. Make the necessary code edits (use Cursor edit instructions as you normally would). b. Mark the item as done with a short note explaining what was changed. If any item is ambiguous or unclear, ask the user for clarification using: <commentary>[Your question about the ambiguous item]</commentary> Then stop the process and wait for a response. 3. Update Checklist File Save the updated checklist to a file named: .cursor/tmp/component-refactor-checklist-{{COMPONENT_PATH}}.md 4. Summary Output Provide a summary of the refactoring process using these exact tags: <refactor_summary> [List each completed item with a brief note about what was changed] </refactor_summary> <checklist_updated> [Include the full updated checklist markdown here] </checklist_updated> After providing the summary output, ask the following question: ✅ Refactor complete. Proceed to validation? Important rules to follow: - Do NOT build a post-refactor contract in this step. - Do not provide any extra commentary outside of the specified blocks and questions unless there is an error or you need clarification. - Always use the exact tag names and formats specified in these instructions. Remember, your role is to follow these instructions precisely and provide clear, concise output as specified.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/push-based/angular-toolkit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server