An experimental, Windows-only VS Code extension for keeping Unity C# files and
their existing .meta files aligned during VS Code-side file operations.
Guardian provides extension-owned, collision-checked move and delete operations
for people and AI agents. All calls share one FIFO transaction queue so multiple
agents cannot mutate overlapping file state concurrently.
AI agents should call unity_meta_files_get_rules before file refactors and use
unity_meta_files_move_cs or unity_meta_files_delete_cs instead of ordinary
filesystem operations. The same contract is documented in
AI_FILE_WORKFLOW.md.
Diagnostic probe
- Install Node.js and run
npm install.
- Run
npm test for the pure Windows path rules.
- Press F5 and choose Run diagnostic probe.
- Rename, move, create, or delete
Probe.txt in the fixture's Explorer.
- Open Output: Unity Meta Files Guardian to inspect timestamped JSON event records.
Commands:
Unity Meta Files Guardian: Start Diagnostics
Unity Meta Files Guardian: Stop Diagnostics
Unity Meta Files Guardian: Show Diagnostics
Unity Meta Files Guardian: Export Diagnostics
Safety model
Stable VS Code onWill...Files listeners cannot reliably cancel the original
Explorer operation when metadata preflight fails. Guardian therefore guarantees
pairing only through its extension-owned commands and AI tools.
Manual Explorer changes remain observable. After a manual .cs move or delete,
Guardian reconciles the adjacent metadata only when the resulting state is
unambiguous and collision-free; otherwise it stops and reports diagnostics.
Guardian never creates metadata for new files because Unity owns that lifecycle.
See DECISIONS.md for the living research, experiment, and failure record.
Publishing
The GitHub Actions Marketplace workflow validates, tests, packages, preserves the
generated VSIX as a build artifact, and publishes it. Tagged builds (v0.0.1, for
example) publish to the pre-release channel. A stable release must be started
manually with the stable channel selected.
Configure the vscode-marketplace GitHub environment with:
- Variable
VSCE_PUBLISHER: the Marketplace publisher ID.
- Secret
VSCE_PAT: a Marketplace publishing token.
Add required reviewers to that environment if publishing should wait for manual
approval. The tag must match the version in package.json.