cc-os/openspec/specs/memsearch-sync/spec.md

26 lines
1.3 KiB
Markdown

# Spec: Memsearch Sync
## Purpose
Defines the requirements for the memsearch git-sync hook entry point, including separation of concerns from the session-end vault-journal hook and preservation of ADR-015 sync behavior.
## Requirements
### Requirement: memsearch git-sync in dedicated hook entry
The memsearch git-sync operation SHALL execute from its own hook entry point (`memsearch_sync.py`) rather than from `session_end.py`.
#### Scenario: session-end handles vault journal only
- **WHEN** a session ends
- **THEN** `session_end.py` handles only vault journal writes; it does NOT perform any memsearch git operations
#### Scenario: memsearch-sync hook handles git operations
- **WHEN** a session ends
- **THEN** `memsearch_sync.py` runs as a separate SessionEnd hook entry and performs the memsearch git commit+push
### Requirement: ADR-015 behavior preserved
The memsearch git-sync MUST continue to auto-commit and push to `forgejo.swansoncloud.com/jared/memsearch` on session end, exactly as specified by ADR-015. This split is a relocation of which file performs the sync, not a change to sync behavior or destination.
#### Scenario: Sync still fires on session end
- **WHEN** a session ends after cutover
- **THEN** memsearch daily memory files are committed and pushed to the Forgejo repo, identical to pre-cutover behavior