docs: document git2 automated context binding in design and instructions
This commit is contained in:
1 parent
c88d312c8c
commit
04a9a4963c
2 files changed
+6
-3
No files matched your search
+2
-2
@@ -102,8 +102,8 @@ When starting a new session, get a numerical aggregate of the project's current
|
||||
|
||||
## Git Context Binding (VCS Sync)
|
||||
To maintain absolute traceability, we link memory items directly to the exact git commits they occurred on.
|
||||
- When calling **log_code_change**, **log_error_fix**, or **log_tech_debt**, you should execute git rev-parse HEAD and git branch --show-current in the project directory first (if it's a git repo).
|
||||
- Pass the resulting hash and branch name into the git_commit and git_branch arguments of those tools to permanently link the memory item to the VCS state.
|
||||
- **Fully Automated (git2):** You no longer need to manually execute `git rev-parse HEAD` or pass `git_branch` / `git_commit` arguments.
|
||||
- When you call tools like **log_code_change**, **log_error_fix**, or **log_tech_debt**, the Rust server uses the native `git2` crate to automatically discover the repository context of the active working directory, extract the current HEAD commit hash, message, and branch, and permanently bind them to the memory item in the background.
|
||||
|
||||
## 13. Server Lifecycle & Updates (Graceful Shutdown)
|
||||
When instructed to restart, update, or stop the mcp-memory-server binary, never use brute-force OS kill commands (e.g. Stop-Process, pkill, kill).
|
||||
|
||||
Reference in new issue
Block a user