chore: add multi-agent editor config and UBS file-write hook
Add rule/config files for Cursor, Cline, Codex, Gemini, Continue, and OpenCode editors pointing them to project conventions, UBS usage, and AGENTS.md. Add a Claude Code on-file-write hook that runs UBS on supported source files after every save. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
.claude/hooks/on-file-write.sh
Executable file
12
.claude/hooks/on-file-write.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Ultimate Bug Scanner - Claude Code Hook
|
||||
# Runs on every file save for UBS-supported languages (JS/TS, Python, C/C++, Rust, Go, Java, Ruby)
|
||||
|
||||
if [[ "$FILE_PATH" =~ \.(js|jsx|ts|tsx|mjs|cjs|py|pyw|pyi|c|cc|cpp|cxx|h|hh|hpp|hxx|rs|go|java|rb)$ ]]; then
|
||||
echo "🔬 Running bug scanner..."
|
||||
if ! command -v ubs >/dev/null 2>&1; then
|
||||
echo "⚠️ 'ubs' not found in PATH; install it before using this hook." >&2
|
||||
exit 0
|
||||
fi
|
||||
ubs "${PROJECT_DIR}" --ci 2>&1 | head -50
|
||||
fi
|
||||
Reference in New Issue
Block a user