mom-rebuild
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRebuild discards the synthesized vault and re-creates it from offset 0 over the entire captured history. It is heavier than a fold — use it deliberately. For routine end-of-session saves, use instead.
/mom-fold重建操作会丢弃已合成的vault,并从偏移量0开始基于完整的捕获历史重新创建它。它比fold操作更耗费资源——请谨慎使用。对于常规的会话结束保存,请改用。
/mom-foldPreflight
前置检查
Check that is on PATH:
mombash
command -v momIf it is missing, tell the user MOM is not installed and ask permission to install it:
text
MOM is not installed. Install it now with Homebrew?
brew install momhq/tap/mom
Source: https://github.com/momhq/momIf the user agrees, run that command. If the user declines, stop. Do not install MOM without explicit permission.
Confirm a project is bound:
bash
test -f .mom-project.yamlIf it is missing, the directory is unbound — there is nothing to rebuild. Tell the user to bind first with , then stop.
/mom-project确认已在PATH中:
mombash
command -v mom如果未找到,请告知用户MOM未安装并询问是否允许安装:
text
MOM is not installed. Install it now with Homebrew?
brew install momhq/tap/mom
Source: https://github.com/momhq/mom如果用户同意,执行该命令。如果用户拒绝,停止操作。未经明确许可不得安装MOM。
确认项目已绑定:
bash
test -f .mom-project.yaml如果该文件缺失,说明当前目录未绑定项目——没有可重建的内容。告知用户先使用绑定项目,然后停止操作。
/mom-projectRun
执行步骤
Confirm with the user before rebuilding — it regenerates the whole vault from scratch (human-authored content in CLAUDE.md is preserved; synthesized vault files are replaced) and runs the LLM engine over all history, so it can be slow.
On confirmation:
bash
mom vault rebuildAppend only if the user named a specific engine. When it finishes, run and report the watermark, file count, and engine used.
--engine <auto|claude|codex|pi>mom vault status重建前需与用户确认——这会从头开始重新生成整个vault(CLAUDE.md中的人工编写内容会保留;合成的vault文件将被替换),并针对所有历史运行LLM引擎,因此可能会较慢。
获得确认后执行:
bash
mom vault rebuild仅当用户指定了特定引擎时,才添加参数。完成后,执行并报告水印、文件数量和所使用的引擎。
--engine <auto|claude|codex|pi>mom vault statusRules
规则
- Always confirm before rebuilding — it is a full regeneration over all captured history.
- For routine saves use ; reserve rebuild for engine changes or recovery from a corrupted vault.
/mom-fold - CLI flag surface — never invent flags. Before using any flag, run and confirm it appears.
mom vault rebuild --help
- 重建前必须确认——这是针对所有捕获历史的完整重新生成操作。
- 常规保存请使用;仅在切换引擎或从损坏的vault恢复时才使用重建操作。
/mom-fold - CLI参数仅使用现有选项——切勿自创参数。 使用任何参数前,请执行确认该参数存在。
mom vault rebuild --help
Postflight (version hint)
后续检查(版本提示)
Any command may print a banner to stderr like:
mom ...MOM 0.40.1 available. Run `brew upgrade mom` or `mom self-update`If you see that line, finish the task first, then add one short line at the end of your reply suggesting the upgrade. Do not run the upgrade yourself.
任何命令都可能在stderr中打印如下横幅:
mom ...MOM 0.40.1 available. Run `brew upgrade mom` or `mom self-update`如果看到该提示,请先完成当前任务,然后在回复末尾添加一行简短的升级建议。请勿自行执行升级操作。