The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
refactor: address reviewer feedback
Lidang-Jiang3c3781ca4385
diff --git a/scripts/hooks/doc-file-warning.js b/scripts/hooks/doc-file-warning.jsindex b0f3eea3a..ea685e259 100644--- a/scripts/hooks/doc-file-warning.js+++ b/scripts/hooks/doc-file-warning.js@@ -28,8 +28,8 @@ function isSuspiciousDocPath(filePath) {const normalized = filePath.replace(/\\/g, '/');const basename = path.basename(normalized);- // Only inspect .md and .txt files- if (!/\.(md|txt)$/i.test(basename)) return false;+ // Only inspect .md and .txt files (case-sensitive, consistent with ADHOC_FILENAMES)+ if (!/\.(md|txt)$/.test(basename)) return false;// Only flag known ad-hoc filenamesif (!ADHOC_FILENAMES.test(basename)) return false;@@ -44,7 +44,7 @@ function isSuspiciousDocPath(filePath) {* Exportable run() for in-process execution via run-with-flags.js.* Avoids the ~50-100ms spawnSync overhead when available.*/-function run(inputOrRaw) {+function run(inputOrRaw, options = {}) {let input;try {input = typeof inputOrRaw === 'string'@@ -61,7 +61,7 @@ function run(inputOrRaw) {stderr:'[Hook] WARNING: Ad-hoc documentation filename detected\n' +`[Hook] File: ${filePath}\n` +- '[Hook] Consider using structured paths: docs/, .claude/commands/, skills/',+ '[Hook] Consider using a structured path (e.g. docs/, .claude/, skills/, .github/, benchmarks/, templates/)',};}diff --git a/tests/hooks/doc-file-warning.test.js b/tests/hooks/doc-file-warning.test.jsindex fc492145b..9d9666347 100644--- a/tests/hooks/doc-file-warning.test.js+++ b/tests/hooks/doc-file-warning.test.js@@ -102,7 +102,7 @@ function runTests() {}) ? passed++ : failed++);}- // 5. Lowercase and partial-match filenames - NOT on denylist, no warning+ // 5. Lowercase, partial-match, and non-standard extension case - NOT on denylistconst allowedNonDenylist = ['random-notes.md','notes.txt',@@ -111,6 +111,8 @@ function runTests() {'todo-list.md','my-draft.md','meeting-notes.txt',+ 'TODO.MD',+ 'NOTES.TXT',];for (const file of allowedNonDenylist) {(test(`allows non-denylist doc file: ${file}`, () => {