From 4ddc77bb364973ee02c6a71fa4deabc77915a434 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 10 Feb 2026 14:28:47 +1100 Subject: [PATCH] Update eng/validate-collections.mjs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eng/validate-collections.mjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eng/validate-collections.mjs b/eng/validate-collections.mjs index 914a23fa..77bb5806 100644 --- a/eng/validate-collections.mjs +++ b/eng/validate-collections.mjs @@ -243,10 +243,14 @@ function validateCollectionItems(items) { i + 1 } kind is "agent" but path doesn't end with .agent.md`; } - if (item.kind === "hook" && !item.path.endsWith(".hook.md")) { - return `Item ${ - i + 1 - } kind is "hook" but path doesn't end with .hook.md`; + if (item.kind === "hook") { + const isValidHookPath = + item.path.startsWith("hooks/") && item.path.endsWith("/README.md"); + if (!isValidHookPath) { + return `Item ${ + i + 1 + } kind is "hook" but path must be hooks//README.md`; + } } // Validate agent-specific frontmatter