- Move session_memory.py, ensure-symlinks.sh into skills/cognitive-memory/scripts/ - Copy systemd units into skills/cognitive-memory/systemd/ with README - Move PROJECT_PLAN.json, migrate.py into skills/cognitive-memory/dev/ - Add mtime-based embeddings cache to client.py (6x faster semantic recall) - Default recall to semantic+keyword merge (was keyword-only) - Update settings.json SessionEnd hook path, MCP allow entry - Update SKILL.md, feature.json, mcp_server.py docs for new defaults Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
774 B
Bash
Executable File
27 lines
774 B
Bash
Executable File
#!/bin/bash
|
|
# Ensure all Claude Code project MEMORY.md files symlink to cognitive memory CORE.md
|
|
# This makes CORE.md auto-load into every session's system prompt.
|
|
# Run by cognitive-memory-daily.service or manually.
|
|
|
|
CORE="/home/cal/.claude/memory/CORE.md"
|
|
PROJECTS="/home/cal/.claude/projects"
|
|
|
|
if [ ! -f "$CORE" ]; then
|
|
echo "ERROR: CORE.md not found at $CORE"
|
|
exit 1
|
|
fi
|
|
|
|
for dir in "$PROJECTS"/*/; do
|
|
memdir="$dir/memory"
|
|
memfile="$memdir/MEMORY.md"
|
|
mkdir -p "$memdir"
|
|
# Only create/fix symlink if it doesn't already point to CORE.md
|
|
if [ -L "$memfile" ] && [ "$(readlink "$memfile")" = "$CORE" ]; then
|
|
continue
|
|
fi
|
|
# Remove existing file (regular file or broken symlink)
|
|
rm -f "$memfile"
|
|
ln -s "$CORE" "$memfile"
|
|
echo "Linked: $memfile"
|
|
done
|