ait snapshot
Record immutable repository state and inspect Snapshot content or ancestry.
Audience: Coding agents and maintainers
Role#
Normally created by the coding agent after the bounded implementation and repository checks are complete. Snapshot inspection is safe for users.
Purpose#
ait snapshot records immutable repository state and exposes content, comparison, ancestry, and recovery queries. A Snapshot keeps its authoring Line identity even when a later Change or closeout target moves.
Syntax#
ait snapshot create --message <message>
ait snapshot show <snapshot-id> --files
ait snapshot ancestry <snapshot-id> --ancestorsSnapshot comparison uses two immutable identifiers:
ait snapshot diff <old-snapshot-id> <new-snapshot-id>Example#
ait snapshot create --message "Add accessible password visibility control"Run this from the Task workspace after validation. A normal Snapshot records code state; separately authored sprint Markdown remains Plan lineage.
Output#
Create returns the new Snapshot and parent. Show can include the full file inventory, while ancestry queries are bounded unless complete output is explicitly requested.
Failure and recovery#
A dirty or misplaced workspace should be inspected with ait status and ait diff before retrying. Revert and replay operations are separate explicit surfaces; preview their effect before replacing workspace content.