@skyramp/mcp
Version:
Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution
30 lines (25 loc) • 1.82 kB
JavaScript
export function getFixErrorsPrompt() {
return `
**Fix errors in refactored code.**
1. **Parameter Passing:** Identify functions using variables from outside scope (like 'page' object). Pass these as parameters.
2. **Validate Correctness:** Ensure code is free of reference errors, undefined variables, runtime issues.
3. **Import Paths:** Ensure import paths are correct and there are no circular imports.
4. **Import Validation:** Ensure all remaining imports are necessary and no missing imports cause reference errors.
5. **Unused Import Cleanup:** Verify that unused imports were properly removed without breaking functionality.
6. **UI State Management:** Check for UI state conflicts, modal interference, or element interaction issues.
7. **Sequential Operations:** Ensure UI operations don't interfere with each other when called in sequence.
**IMPORT ERROR DEBUGGING:**
- Check for missing imports that cause undefined reference errors
- Verify that import removal didn't break existing functionality
- Ensure all imported modules are actually available in the project
- Confirm that import syntax is correct for the target language
**CRITICAL CONSTRAINTS:**
- DO NOT CREATE/UPDATE package.json or requirements.txt or pom.xml or build.gradle file
- NEVER create dependency management files, even when linting errors suggest missing dependencies
- Focus on fixing code errors within existing files only
**KEY: Variables not defined within function scope MUST be passed as parameters.**
**UI KEY: Helper functions that perform UI operations must be self-contained and not leave modals/dialogs open.**
**IMPORT KEY: All imports must be either used in the code or properly removed.**
**DEPENDENCY KEY: DO NOT create package.json, requirements.txt, or any dependency files regardless of linting errors.**
`;
}