edit_collision_guard
Records a file snapshot after reading, then verifies before editing to detect external modifications, preventing silent overwrites and edit conflicts.
Instructions
Two-step guard: record_read (snapshot) after reading, check before editing. Detects external edits. Pairs edit_transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path relative to workspace_dir | |
| action | Yes | record_read: snapshot after reading; check: verify before editing | |
| session_id | No | Optional session ID for multi-agent isolation (default: "default") | |
| workspace_dir | Yes | REQUIRED: project root (abs). reindex first if new. |