Use
Drift
Detect when project files or the lockfile disagree with the last apply.
After apply, teammates may edit generated harness files directly. HarnessTap tracks drift against the last apply or mirror snapshot, and against apm.lock.yaml.
ht status .
ht status . --check
ht status . --check --format json # exit 1 when drift existsstatus --check compares the working tree against the latest apply/mirror snapshot, and reports when the lockfile disagrees with the applied composition. Exit code 1 means actionable drift — useful in CI.
Snapshots and revert
When the repository has a git origin, ht apply stores a snapshot before writing files.
ht history .
ht revert <snapshot-id>history, status --check, and revert require a git-backed project. apply can write files outside git, but snapshot support only works when the target has a git origin.
What to do
| Situation | Action |
|---|---|
| Harness files edited by hand, keep them | Commit the files; next apply may overwrite unless you compose the change into a plugin |
| Harness files edited by hand, discard them | ht revert <id> or re-apply the plugin |
Lock disagrees with apm.yml | ht apply to restore the lock, or ht apply --update to re-resolve and rewrite apm.lock.yaml |
| Alias harnesses lag the main harness | ht mirror . — does not re-resolve the plugin; use apply for a fresh baseline |
See Scenario 21 for the numbered playbook.