Run only after the user explicitly asks to bind, rebind, or set up project scoping (or after the user accepts a nudge from
about an unbound directory).
A bound directory has a
file at its root declaring a project
. Memories captured while working in that directory are tagged with that id, and recall scopes to it by default.
If it is missing, tell the user MOM is not installed and ask permission to install it:
If the user agrees, run that command. If the user declines, stop. Do not install MOM without explicit permission.
-
Check whether the current directory is already bound:
bash
test -f .mom-project.yaml && cat .mom-project.yaml
If the file exists, show the current
and ask the user to either keep it or rebind to a different one. Warn that rebinding does not merge memories from the old id — recall will only see memories tagged with the new id.
If the file does not exist, continue.
-
Propose an
. Default to the current directory's basename, lowercased, trimmed, with spaces replaced by dashes. Show the proposal and ask the user to confirm or pick a different one.
The id is an opaque label. Suggest something specific (for example
or
) if the user might sync memories with other machines or teammates — unrelated projects sharing the same id will collide.
-
Write the binding:
bash
mom project bind --id <chosen-id>
If the directory already declares a different id and the user agreed to rebind, append
.
-
Tell the user to commit
to version control so the binding travels with the repo.
Any
command may print a banner to stderr like:
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.