Using workspace.diagnose for Path Validation
The workspace.diagnose command checks paths for problems before Vex tries to use them. It catches seven types of issues that would cause file operations to fail. Running diagnose before a file operation is like checking your GPS before driving.
Seven anomaly types:
- Double-nesting: Paths like
Assets/Assets/Scriptswhere a folder name is repeated - Outside project root: Paths that escape your project directory
- Protected paths: Attempts to access .git, Library, Temp, or Logs
- File-at-directory conflicts: A file exists where a directory is expected
- Missing parent directories: Parent folder does not exist yet
- Illegal Unity characters: Characters Unity does not allow in asset names
- Extension placement errors: A folder named
Scripts.csby accident
Usage: workspace.diagnose action="check" path="Assets/Scripts/Player.cs"
Valid paths return {valid: true, anomalies: []}. Problem paths return details about what is wrong and the severity level.
When Vex uses it: Before file operations, especially when paths come from you or are built by combining strings. This is part of the DISCOVER step in DAP — catching a bad path before the operation runs saves time and frustration.
Error integration: When file operations fail due to path issues, GameCatalyst’s self-healing automatically suggests workspace.diagnose in the recovery guidance, keeping Vex on the structured DAP workflow instead of guessing at fixes blindly.
Common path mistakes diagnose catches:
The most frequent issue diagnose detects is double-nesting — paths like Assets/Assets/Scripts where a folder name is accidentally repeated. This happens when AI assistants construct paths by combining a root path with a relative path that already includes the root. Diagnose catches this instantly and reports the exact problem so Vex can fix the path before proceeding.
Missing parent directories:
If Vex tries to create a file at Assets/Scripts/Player/Movement/Controller.cs but the Player/Movement folder does not exist yet, diagnose flags the missing parent. Vex then creates the missing folders before creating the file, preventing file creation failures.
Integration with DAP:
workspace.diagnose is part of the DISCOVER step. Vex validates paths before executing file operations. When file operations fail due to path issues, GameCatalyst’s self-healing system automatically suggests workspace.diagnose in the recovery guidance, keeping Vex on the structured workflow.
Diagnose is a small command with a big impact on reliability.