memory_pre_edit
Run a guardrail check on a file and code snippet before writing. Get a STOP or PROCEED decision on NEVER-guardrail violations and FAILED_APPROACH warnings to avoid protected area errors.
Instructions
Pre-edit guardrail check for a specific file and code snippet. Given a file path and the code you're about to write, check whether it violates any NEVER guardrails or triggers FAILED_APPROACH warnings. Returns a clear STOP/PROCEED decision. Call this before writing to files in protected areas.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code snippet you're about to write (added lines only) | |
| agent_id | No | Your agent identifier, e.g. 'claude-code' | |
| file_path | Yes | Repo-relative file path being edited |