浏览 1.0.0 文档
1.0.0 文档修订 2

ait snapshot

记录不可变的仓库状态,并查看 Snapshot 内容或父级沿革。

适用人群: coding agent 与维护者

角色#

通常由 coding agent 在有界的实现和仓库检查都做完之后创建。查看 Snapshot 对用户来说是安全的。

用途#

ait snapshot 记录不可变的仓库状态,并提供内容、比较、祖先和恢复 这几类查询。即使后来的 Change 或收尾目标挪了位置,Snapshot 也保留 它创建时所在的 Line 标识。

语法#

Code · bash
ait snapshot create --message <message>
ait snapshot show <snapshot-id> --files
ait snapshot ancestry <snapshot-id> --ancestors

比较 Snapshot 要用两个不可变的标识符:

Code · bash
ait snapshot diff <old-snapshot-id> <new-snapshot-id>

示例#

Code · bash
ait snapshot create --message "Add accessible password visibility control"

验证通过后,在 Task 工作区里运行这条命令。普通的 Snapshot 记录的是 代码状态;单独写的 sprint Markdown 仍然归 Plan 沿革管。

输出#

create 返回新的 Snapshot 和它的父级。show 可以带上完整的文件清单; 祖先查询默认是有上限的,除非你明确要求输出全部。

失败与恢复#

工作区不干净或者放错了地方,先用 ait statusait diff 查一遍 再重试。回退和重放各自是独立的显式入口;替换工作区内容之前,先预览 一下它们的效果。

相关参考#

Version authority

Checked against the exact 1.0.0 source

This page is public documentation, not a second product contract. Use the exact source and distribution contract for release authority.

Owning component Snapshots
  • ait-coreSNP-B06A48DA0245
  • ait-serverSNP-E90456E6425E
  • ait-runnerSNP-6B0A1BB3AFAD
  • ait-pythonSNP-973E3BFAF3DE
  • ait-nodeSNP-F962CC66AA62