Commit Graph

18 Commits

Author SHA1 Message Date
Cal Corum
e484b2ab35 feat: cognitive-memory multi-graph support, XDG data paths, remove CORE.md auto-load
- Multi-graph: named graph routing in MCP server (graph param on all tools),
  CLI --graph flag, graphs subcommand, resolve_graph_path() in common.py
- XDG compliance: data dir resolves via COGNITIVE_MEMORY_DIR env > XDG_DATA_HOME > ~/.local/share/
- Remove CORE.md auto-loading: drop MEMORY.md symlinks, update CLAUDE.md to MCP-first recall
- Update all scripts (git-sync, ensure-symlinks, edge-proposer) for portable path resolution
- Remove symlinks step from daily systemd service
- Version bump to 3.1.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 14:55:12 -06:00
Cal Corum
ba0562a8ba refactor: split client.py into 6 focused modules using mixin composition
3,348-line monolith → 6 modules with mixin classes resolving via MRO.
client.py retains __init__, internal helpers, and core CRUD (1,091 lines).
All backward-compat imports preserved for mcp_server.py and dev/migrate.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:12:57 -06:00
Cal Corum
471d8709f6 fix: support partial UUID prefix matching in memory/edge lookups
Closes cal/claude-memory#3. All ID-based lookups now resolve partial
UUID prefixes (git-style) instead of requiring exact full UUIDs.
Affects _resolve_memory_path, _resolve_edge_path, edge_search, and
related(). Ambiguous prefixes raise ValueError with candidates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:57:08 -06:00
Cal Corum
7f120f8c5c Fix _save_state race condition losing last_reflection timestamp
Daily and weekly timers fired simultaneously on Sundays, causing
decay() and reflect() to race on _state.json. Now merges top-level
keys before writing and uses atomic tempfile+rename to prevent
partial reads from triggering silent JSONDecodeError fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 00:45:41 -06:00
Cal Corum
25792a74f4 Gitignore backups/, add memory git sync, update daily service
- .gitignore: Add backups/ to stop noisy session backup rotation diffs
- Remove tracked backup files from index
- skills/cognitive-memory/mcp_server.py: Auto-push to Gitea on memory_store and memory_relate
- skills/cognitive-memory/scripts/memory-git-sync.sh: New git commit+push script
- skills/cognitive-memory/systemd/cognitive-memory-daily.service: Add git sync as fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 23:37:49 -06:00
Cal Corum
a189bb546d Add edge emphasis to cognitive memory skill and edge-proposer script
- SKILL.md: New workflow pattern for creating edges between memories
- SKILL.md: Added proactive trigger for edge creation after storing memories
- SKILL.md: Updated bug fix example to show relating solution to problem
- scripts/edge-proposer.py: Retroactive edge candidate analysis tool
  Scores memory pairs by type heuristics, tag overlap, and content similarity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 23:31:07 -06:00
Cal Corum
f0f075461e Reorganize cognitive-memory skill: consolidate scripts, systemd, dev subdirs
- 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>
2026-02-19 16:02:20 -06:00
Cal Corum
09429eec3a Auto-log episode entries on MCP memory_store (default true)
MCP store was missing the --episode behavior that the CLI had,
so episodes stopped being logged when sessions switched to using
MCP tools. Now defaults to true with opt-out via episode=false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:11:40 -06:00
Cal Corum
aed98a3cc8 Rebalance semantic/keyword merge weights to 60/40
Normalize both signals to 0-1 range so semantic similarity scores
aren't drowned out by keyword position scores. Jellyfin DB recovery
now ranks #1 for "media server database broken sqlite error" instead
of being buried behind keyword noise matches on "error".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:07:43 -06:00
Cal Corum
4770c15429 Add --if-changed flag to embed, configurable Ollama model, hourly timer
- embed --if-changed compares memory ID sets to skip when unchanged
- --ollama-model config flag to switch models without code changes
- _ollama_embed now accepts model param, respects config throughout
- Switched default to qwen3-embedding:8b (70+ MTEB vs nomic's ~52)
- Hourly systemd timer for embedding, daily timer no longer embeds
- Fixed PATH for uv in both systemd services

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:54:21 -06:00
Cal Corum
a2d18ef0c2 Cognitive Memory v3.0: rich edges, hybrid embeddings, MCP server
Add first-class edge files in graph/edges/ with bidirectional frontmatter
refs, hybrid Ollama/OpenAI embedding providers with fallback chain, and
native MCP server (18 tools) for direct Claude Code integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:11:18 -06:00
Cal Corum
b3e11f146e Update cognitive-memory skill docs and sync plugin/settings changes
- Add CLI entrypoint callout to cognitive-memory SKILL.md
- Update plugin configs (blocklist, install counts, marketplaces)
- Update settings.json
- Rotate config backups

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 07:24:14 -06:00
Cal Corum
9887011f6d Add playwright-cli skill, update cognitive-memory, sync plugins
- Install playwright-cli skill from microsoft/playwright-cli repo
- Remove relate/related/relationship references from cognitive-memory SKILL.md
- Update installed plugins and marketplace config
- Update settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:58:46 -06:00
Cal Corum
17b0e37ad1 Sync: new commit commands, cognitive-memory uv fix, major-domo CLI split, statusline plugin
- Add commit.md and commit-push-pr.md commands
- Update cognitive-memory SKILL.md to use claude-memory wrapper
- Split major-domo CLI into cli.py + cli_admin.py
- Add claude-statusline scripts and plugins dir
- Remove deprecated claude-pulse script
- Update settings.json and claude-researcher agent

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:14:44 -06:00
Cal Corum
a4ae9774ad Update memory protocol docs for CORE.md auto-load via symlinks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:50:30 -06:00
Cal Corum
08b74ec6d6 Fix decay baseline so new memories start Active instead of Fading
Changed zero-access usage_factor from 0.5 to 1.0 in calculate_decay_score().
Previously, a freshly stored solution (importance=0.7, weight=1.2) scored
0.42 (Fading); now scores 0.84 (Active) as intended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:20:07 -06:00
Cal Corum
b2b024f0e3 Replace gitea-create-pr.sh script with tea CLI
Removed custom PR creation script in favor of native tea CLI tool.

Before: /home/cal/.claude/scripts/gitea-create-pr.sh cal/repo branch main "Title"
After: tea pulls create --repo cal/repo --head branch --base main --title "Title"

Benefits:
- No custom script maintenance
- Native Gitea CLI with better error handling
- Support for labels, assignees, milestones
- Consistent with other Gitea operations

Updated CLAUDE.md with tea pulls create examples.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 15:20:56 -06:00
Cal Corum
047ec745eb Add new skills, commands, scripts; update Paper Dynasty workflows
New:
- backlog, cognitive-memory, optimise-claude skills
- commands/ and scripts/ directories
- usage-data tracking

Updated:
- Paper Dynasty: consolidated workflows, updated API client and CLI
- .gitignore, CLAUDE.md, settings.json

Removed:
- Deprecated Paper Dynasty workflows (card-refresh, database-sync,
  discord-app-troubleshooting, gauntlet-cleanup, custom-player-db)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:10:21 -06:00