claude-memory/graph/fixes/fix-memory-repo-pre-commit-hook-blocking-edge-files-missing-c3f6fb.md
2026-02-19 23:40:00 -06:00

1.2 KiB

id type title tags importance confidence created updated relations
c3f6fbc2-04d0-41ef-87c2-8685d8769ac3 fix Fix: memory repo pre-commit hook blocking edge files missing title field
cognitive-memory
git
pre-commit-hook
fix
edge-files
0.6 0.8 2026-02-20T05:39:51.522395+00:00 2026-02-20T05:40:00.105088+00:00
target type direction strength edge_id
43cb893a-c577-407e-a41c-51d7f81e80f6 CAUSES incoming 0.8 6cecf4c4-e3c4-44f7-bba8-ad69a10f9c86

Pre-commit Hook Fix: Edge Files Have Different Schema

Problem

The ~/.claude/memory repo pre-commit hook required id, type, and title fields on all markdown files under graph/. Edge files use a different schema with no title field:

# Edge file schema
id: <uuid>
type: <relation_type>
from_id: <uuid>
to_id: <uuid>
from_title: <string>
to_title: <string>

This caused all edge commits to be blocked with a validation error about the missing title field.

Fix

Added a path check in the pre-commit hook:

  • Files matching graph/edges/ validate against edge schema: (id, type, from_id, to_id)
  • All other files continue to require (id, type, title)

Location

~/.claude/memory/.git/hooks/pre-commit (or equivalent hook script)