validate_change_with_workspace
Performs workspace-wide checks to detect import cycles and deleted public symbols before writing file changes, preventing breaking modifications to shared modules and public APIs.
Instructions
Workspace-aware gate (Ring 0 + 0.5 + 0.7 + R2). Adds cross-file checks on top of validate_change: detects when a change introduces a module import cycle, or deletes a public symbol that other files in the workspace still reference. Slower than validate_change because it walks the workspace tree; prefer this when the change touches a public API or shared module.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_content | Yes | Full file contents the agent intends to write. | |
| old_content | No | Optional baseline for cost-aware regression. | |
| path | Yes | Absolute or workspace-relative path the agent intends to write. | |
| workspace_root | Yes | Absolute path to the project root. Used to build a one-shot workspace index for cycle detection and public-symbol reference tracking. |