mom-fold

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Invoking 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
.mom/vault/
. It is the end-of-session step that turns raw captured turns into navigable memory.
调用此skill即表示用户请求收尾。请立即按照以下流程操作——无需询问用户是否确认要执行合并操作。
合并操作会读取自上次合并以来捕获的事件,并将其整合到项目
.mom/vault/
路径下的markdown仓库中。这是会话结束阶段的步骤,可将原始捕获的会话内容转换为可导航的记忆内容。

Preflight

预检步骤

Check that
mom
is on PATH:
bash
command -v mom
If 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/mom
If 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.yaml
If it is missing, the directory is unbound and nothing has been captured. Tell the user to bind first with
/mom-project
, then stop.
检查
mom
是否已加入PATH:
bash
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-project
绑定项目,然后停止操作。

Run

执行步骤

bash
mom vault fold
Folding 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 status
and 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
    --engine
    flag unless the user explicitly asked for a specific engine.
  • If
    mom vault fold
    reports there is nothing new, say so — folding again is a safe no-op.
  • Never edit files under
    .mom/vault/
    by hand from this skill; folding owns them.
  • CLI flag surface — never invent flags. Before using any flag on any
    mom
    subcommand, run
    <subcommand> --help
    and confirm the flag appears. If it is not listed, do not use it.
  • 除非用户明确要求使用特定引擎,否则不要传递
    --engine
    参数。
  • 如果
    mom vault fold
    报告没有新内容,请告知用户——再次执行合并操作是安全的空操作。
  • 切勿通过此skill手动编辑
    .mom/vault/
    下的文件;这些文件由合并操作管理。
  • CLI参数范围——切勿自行创建参数。在任何
    mom
    子命令中使用参数前,请运行
    <subcommand> --help
    确认该参数存在。如果未列出,则不要使用。

Postflight (version hint)

后续检查(版本提示)

Any
mom ...
command may print a banner to stderr like:
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.
任何
mom ...
命令可能会向stderr输出如下提示信息:
MOM 0.40.1 available. Run `brew upgrade mom` or `mom self-update`
如果看到该行提示,请先完成当前任务,然后在回复末尾添加一行简短内容建议用户升级。请勿自行执行升级操作。