From dd06afcc31badc48de2449867de34f6d0170ceb0 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 19 Feb 2026 23:39:51 -0600 Subject: [PATCH] store: Fix: memory repo pre-commit hook blocking edge files missing title field --- ...hook-blocking-edge-files-missing-c3f6fb.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 graph/fixes/fix-memory-repo-pre-commit-hook-blocking-edge-files-missing-c3f6fb.md diff --git a/graph/fixes/fix-memory-repo-pre-commit-hook-blocking-edge-files-missing-c3f6fb.md b/graph/fixes/fix-memory-repo-pre-commit-hook-blocking-edge-files-missing-c3f6fb.md new file mode 100644 index 00000000000..e1b0dbfef65 --- /dev/null +++ b/graph/fixes/fix-memory-repo-pre-commit-hook-blocking-edge-files-missing-c3f6fb.md @@ -0,0 +1,39 @@ +--- +id: c3f6fbc2-04d0-41ef-87c2-8685d8769ac3 +type: fix +title: "Fix: memory repo pre-commit hook blocking edge files missing title field" +tags: [cognitive-memory, git, pre-commit-hook, fix, edge-files] +importance: 0.6 +confidence: 0.8 +created: "2026-02-20T05:39:51.522395+00:00" +updated: "2026-02-20T05:39:51.522395+00:00" +--- + +# 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: + +```yaml +# Edge file schema +id: +type: +from_id: +to_id: +from_title: +to_title: +``` + +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)