verify_refactor_safety
Compares old and new code to catch accidental deletions before compilation. Checks function count, signatures, exports, imports, and comment ratio for safe refactoring.
Instructions
Semantic diff between old and new code. Catches accidental deletions before compilation. Checks: function count, signatures, export count, imports, comment ratio. Intentionally conservative — renames appear as errors requiring explicit confirmation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"before": "<before>",
"after": "<after>"
},
"name": "verify_refactor_safety"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | New code text | |
| before | Yes | Original code text | |
| language | No | Language (auto-detected from content) |