Edit File (Kilo-Kit Hard-Gated)
kilo_edit_filePerform exact target search-and-replace edits in an existing file, validating code syntax with an AST check before changes are applied.
Instructions
Perform exact targeted search-and-replace edit on an existing file with AST check. PROTOCOL HARD-GATE: Requires valid sessionId in 'ready' state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Alias for filePath | |
| path | No | Alias for filePath | |
| format | No | markdown | |
| filePath | No | Relative or absolute path to file | |
| sessionId | Yes | Active Kilo-Kit session ID (must be in ready state) | |
| allowMultiple | No | Allow multiple replacements | |
| targetContent | Yes | Exact content substring to replace | |
| decision_narration | No | MANDATORY INTER-TOOL NARRATION: State what you just concluded, verified, or analyzed before calling this tool. Appears in terminal tool badge for full user observability. | |
| replacementContent | Yes | Replacement content | |
| next_action_narration | No | MANDATORY: State what this tool will execute and what immediate action follows. |