Managed Updates & Rollback
AG Kit installs .agents/ as a managed tree: every kit file is tracked in a manifest with SHA-256 hashes, so updates know exactly what is yours and what is the kit’s.
How the managed tree works
Section titled “How the managed tree works”Files you add or modify are not kit-managed, so the default merge strategy preserves them. Only files whose hash matches the manifest are updated in place.
Updating safely
Section titled “Updating safely”Preview the plan
ag-kit update --dry-runShows adds, changes, preserved local files, and conflicts — without touching anything.
Apply the merge
ag-kit updateA backup is created first. Local changes are preserved; conflicting files are kept and incoming copies are stored under .agents/.ag-kit/conflicts/ for review.
Review the report
Each run writes a report with the run ID, strategy, and per-file actions. Use --conflict-report <file> to write it to a custom path.
Want a pristine upstream tree instead? Use ag-kit update --strategy replace. A backup is still created first.
Rolling back
Section titled “Rolling back”- Defaults to the newest backup; pick one with
--backup <id>. - The current tree is backed up before restoring (disable with
--no-keep-current). - Preview with
--dry-run.
Backups live inside your project under .agents/.ag-kit/. Deleting that folder removes your rollback points.
