fix_symbol
Rewrite one named function, method, or class in place by symbol name, with syntax validation and atomic, rollback-able writes that stay immune to line drift.
Instructions
Rewrite one named function, method or class in place. The symbol is extracted with the language's own parser, sent to a worker model, validated, and spliced back atomically. Addressing by name is immune to line drift, so it is safe to issue many against the same file. Skip this only when the edit is too small for a symbol boundary to matter — a one-line typo, a single config value, a comment. Anything that changes what a function does should go through here even when you already read the code: unlike a manual edit, this re-resolves the symbol by name (immune to line drift from earlier edits landing in the same file), validates syntax before writing, and is rollback-able from a saved git blob. Having read the file first buys a manual edit none of that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | Optional shell command run after the write lands, cwd the repo root — e.g. 'pytest tests/test_foo.py -q' or 'php -l path/to/file.php'. Non-zero exit reverts the write and returns the command's output instead of reporting success. The one thing a subagent gets for free by running the suite itself. | |
| context | No | Optional. Signatures or snippets the worker needs. Bare sibling signatures are usually useless; send what actually matters, such as the shape of a parameter. | |
| file_path | Yes | Path to the source file. | |
| instruction | Yes | What to change, stated compactly. The worker sees only this symbol, so anything it needs to know that is not in the code must be said here or passed in context. | |
| symbol_name | Yes | Function or method name. Qualify as 'Class::method' when the bare name is ambiguous — ambiguity is rejected, never guessed. | |
| allow_secrets | No | Override Heimdall, the gate that refuses to send anything looking like a credential to the worker. Only after seeing what it flagged and judging it a false positive. The override is recorded. |