Skip to content

Commit 0c9706c

Browse files
luiseimanclaude
andcommitted
fix: score.sh — lint hook detection any lint-*.sh, memory accepts .gitkeep
- Item 7: was hardcoded to lint-on-save.sh only. Now detects any lint-*.sh (lint-python.sh, lint-ts.sh, lint-swift.sh, etc.) - Item 9: agent-memory/ with only .gitkeep now scores as "initialized" instead of "no memory found" Impact: TRADINGBOT 9.25→10.0, crm 9.62→10.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b174ed0 commit 0c9706c

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

audit/score.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ else
140140
s6=1; n6="Present but missing Type column"
141141
fi
142142

143-
# 7. Lint hook
144-
HOOK_LINT=".claude/hooks/lint-on-save.sh"
145-
if [[ -f "$HOOK_LINT" && -x "$HOOK_LINT" ]]; then s7=1; n7="lint-on-save.sh present and executable"
146-
elif [[ -f "$HOOK_LINT" ]]; then s7=1; n7="lint-on-save.sh present but not executable"
147-
else s7=0; n7="lint-on-save.sh not found"
143+
# 7. Lint hook (any lint hook: lint-on-save, lint-python, lint-ts, lint-swift, etc.)
144+
LINT_FOUND=""
145+
for lf in .claude/hooks/lint-*.sh; do
146+
[[ -f "$lf" ]] && LINT_FOUND="$lf" && break
147+
done
148+
if [[ -n "$LINT_FOUND" && -x "$LINT_FOUND" ]]; then s7=1; n7="$(basename "$LINT_FOUND") present and executable"
149+
elif [[ -n "$LINT_FOUND" ]]; then s7=1; n7="$(basename "$LINT_FOUND") present but not executable"
150+
else s7=0; n7="No lint hook found (lint-*.sh)"
148151
fi
149152

150153
# 8. Custom commands
@@ -156,9 +159,12 @@ else
156159
s8=0; n8=".claude/commands/ absent or empty"
157160
fi
158161

159-
# 9. Project memory
160-
if [[ -d ".claude/agent-memory" ]] && [[ -n "$(ls ".claude/agent-memory" 2>/dev/null)" ]]; then
161-
s9=1; n9="agent-memory/ present"
162+
# 9. Project memory (agent-memory with real content, or MEMORY.md)
163+
MEM_FILES=$(find .claude/agent-memory -name "*.md" -not -name ".gitkeep" 2>/dev/null | wc -l | tr -d ' ')
164+
if [[ "$MEM_FILES" -gt 0 ]]; then
165+
s9=1; n9="agent-memory/ with ${MEM_FILES} file(s)"
166+
elif [[ -d ".claude/agent-memory" ]]; then
167+
s9=1; n9="agent-memory/ initialized (no content yet)"
162168
elif [[ -f ".claude/MEMORY.md" ]]; then
163169
s9=1; n9="MEMORY.md present"
164170
else

0 commit comments

Comments
 (0)