From b6de99f01e85c42a82329e410fd0a8c9a5dabced Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 10 Oct 2026 11:00:29 +0100 Subject: [PATCH] Ignore repo-memory Git metadata in validation Validate only persisted memory entries so a fresh notes.json can pass alongside the checkout's .git directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- workflows/repo-assist.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workflows/repo-assist.md b/workflows/repo-assist.md index 0b17a98..8b964f3 100644 --- a/workflows/repo-assist.md +++ b/workflows/repo-assist.md @@ -96,7 +96,8 @@ tools: const path = require("node:path"); const fail = message => { throw new Error(`notes.json: ${message}`); }; const notesPath = path.join(memoryRoot, "notes.json"); - const memoryEntries = fs.readdirSync(memoryRoot, { withFileTypes: true }); + const memoryEntries = fs.readdirSync(memoryRoot, { withFileTypes: true }) + .filter(entry => entry.name !== ".git"); if (memoryEntries.length !== 1 || !memoryEntries[0].isFile() || memoryEntries[0].name !== "notes.json") { fail(`must be the only file in repo memory; found: ${memoryEntries.map(entry => entry.name).join(", ") || "(none)"}`); }