mcp_engram_safe_edit_and_verify
Safe composite for editing code in crates/, docs/, or processes/: combines context, trace, verification, and lineage checks. Returns trace_id, arc_concept, crs_delta, and reflection.
Instructions
SAFE composite for code edits: context_for_edit + quick_trace + optional __arc update + verify_manifold + lineage check + tensor edit_pattern bond. Prefer this over ad-hoc context_for_edit when changing crates/, docs/, or processes/. Returns trace_id, arc_concept, crs_delta, reflection_suggested. FEW-SHOT EXAMPLES: (1) Pre+post edit with arc delta: {"path":"/home/user/Engram/crates/engram-server/src/mcp.rs","decision":"Add safe_edit composite tool","why":"Agent tool fidelity goal — one-shot verified edit path","arc_delta":"delta: registered mcp_engram_safe_edit_and_verify handler","goal_context":"goal:agent_tool_fidelity_v1"} (2) Intent-only trace before external editor edit: {"path":"/home/user/Engram/docs/AGENT_MEMORY_CONTRACT.md","decision":"Refresh 8-tool examples","why":"Mirror hardened few-shots in docs","run_verify":true}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | Justification for the edit | |
| path | Yes | Absolute file path to edit (required) | |
| decision | Yes | Edit intent — one clear sentence | |
| arc_delta | No | Optional delta narrative appended to first spatial __arc | |
| prev_trace | No | Optional prev_in_trace chain head | |
| run_verify | No | Run sampled verify_manifold_integrity (default true) | |
| goal_context | No | Optional goal:* this edit serves |