Drift Detection
Drift detection compares the actual state of your local workspace against the desired state defined by the workspace revision.
Types of drift
| Drift type | Description |
|---|---|
| Local modification | A generated file was edited locally |
| Missing file | A generated file was deleted |
| Remote update | Workspace revision on the server is newer than local |
| Package update | A newer version exists for a selected package |
| Provider mismatch | Workspace expects a provider that is not rendered locally |
| Unknown file | A file in a Workloom-managed path is not owned by any package |
| Policy drift | Local config violates a workspace or org policy |
| Nested target drift | A monorepo sub-target is missing expected files |
Checking drift
wl status
Shows a human-readable summary:
Workspace: Platform API
Workspace revision: local 41, remote 42
Drift:
remote update available
modified: .claude/skills/security-review/SKILL.md
missing: .codex/config.toml
Suggested:
wl pull
wl restore .codex/config.toml
wl diff
Shows the exact content differences between local files and the expected rendered output.
wl sync --check
CI-safe drift check. No writes. Exits 0 if clean, non-zero if any drift is detected. Emits machine-readable diagnostics.
# In CI
wl sync --check || exit 1
Resolving drift
| Action | Effect |
|---|---|
wl pull | Fetch latest workspace revision and re-render |
wl restore | Restore only Workloom-owned files to expected state |
wl restore <path> | Restore a specific file |
wl push | Publish local changes as a new package version |
Local overrides
When a developer modifies a generated file, Workloom does not fight it. Instead, wl status reports the modification and offers options:
- Restore the server version
- Push the change as a new package version
- Keep the local override (it will be reported as drift until resolved)
Ownership tracking
Workloom tracks which package owns each generated file in .loom/state.json. The restore command uses this metadata to restore only files Workloom owns — it never deletes or overwrites unknown user files.