mom-fold
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInvoking this skill is the user's request to wrap up. Proceed with the flow below immediately — do not ask the user to confirm they want to fold.
Folding reads the events captured since the last fold and synthesizes them into the project's markdown vault under . It is the end-of-session step that turns raw captured turns into navigable memory.
.mom/vault/调用此skill即表示用户请求收尾。请立即按照以下流程操作——无需询问用户是否确认要执行合并操作。
合并操作会读取自上次合并以来捕获的事件,并将其整合到项目路径下的markdown仓库中。这是会话结束阶段的步骤,可将原始捕获的会话内容转换为可导航的记忆内容。
.mom/vault/Preflight
预检步骤
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 — capture and fold only work for a bound directory:
bash
test -f .mom-project.yamlIf it is missing, the directory is unbound and nothing has been captured. 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
执行步骤
bash
mom vault foldFolding is incremental — it only processes events newer than the last watermark — and uses an LLM engine, so it can take a moment. When it finishes, run:
bash
mom vault statusand report a one-line summary: the new watermark offset, files written, and last fold time.
bash
mom vault fold合并操作是增量式的——仅处理比上次水印更新的事件——并且使用LLM引擎,因此可能需要一些时间。完成后,运行:
bash
mom vault status并报告一行摘要信息:新的水印偏移量、已写入的文件数量以及上次合并时间。
Rules
规则
- Do not pass an flag unless the user explicitly asked for a specific engine.
--engine - If reports there is nothing new, say so — folding again is a safe no-op.
mom vault fold - Never edit files under by hand from this skill; folding owns them.
.mom/vault/ - CLI flag surface — never invent flags. Before using any flag on any subcommand, run
momand confirm the flag appears. If it is not listed, do not use it.<subcommand> --help
- 除非用户明确要求使用特定引擎,否则不要传递参数。
--engine - 如果报告没有新内容,请告知用户——再次执行合并操作是安全的空操作。
mom vault fold - 切勿通过此skill手动编辑下的文件;这些文件由合并操作管理。
.mom/vault/ - CLI参数范围——切勿自行创建参数。在任何子命令中使用参数前,请运行
mom确认该参数存在。如果未列出,则不要使用。<subcommand> --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`如果看到该行提示,请先完成当前任务,然后在回复末尾添加一行简短内容建议用户升级。请勿自行执行升级操作。