uv-suite 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,49 @@
1
+ #!/bin/bash
2
+ # UV Suite Hook: Fast deterministic slop check
3
+ # Event: PostToolUse (Edit|Write)
4
+ # Greps for mechanical, unambiguous slop patterns. No LLM, no false positives.
5
+
6
+ INPUT=$(cat)
7
+ FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
8
+
9
+ if [ -z "$FILE_PATH" ] || [ ! -f "$FILE_PATH" ]; then
10
+ exit 0
11
+ fi
12
+
13
+ EXT="${FILE_PATH##*.}"
14
+ FINDINGS=""
15
+
16
+ case "$EXT" in
17
+ ts|tsx|js|jsx)
18
+ # toBeTruthy/toBeDefined in test files
19
+ if echo "$FILE_PATH" | grep -qE "\.(test|spec)\.(ts|tsx|js|jsx)$"; then
20
+ MATCH=$(grep -n "\.toBeTruthy()\|\.toBeDefined()" "$FILE_PATH" 2>/dev/null)
21
+ if [ -n "$MATCH" ]; then
22
+ FINDINGS="${FINDINGS}Weak assertion in $FILE_PATH: $MATCH. Test specific values instead. "
23
+ fi
24
+ fi
25
+ # catch-and-rethrow (catch { ...throw } with nothing meaningful between)
26
+ MATCH=$(grep -n "catch.*{" "$FILE_PATH" 2>/dev/null | head -3)
27
+ ;;
28
+ py)
29
+ # bare except: pass
30
+ MATCH=$(grep -n "except:$\|except Exception:$" "$FILE_PATH" 2>/dev/null)
31
+ if [ -n "$MATCH" ]; then
32
+ NEXT=$(grep -A1 "except" "$FILE_PATH" 2>/dev/null | grep -c "pass\|raise")
33
+ if [ "$NEXT" -gt 0 ]; then
34
+ FINDINGS="${FINDINGS}Bare except with pass/raise in $FILE_PATH. "
35
+ fi
36
+ fi
37
+ ;;
38
+ esac
39
+
40
+ if [ -n "$FINDINGS" ]; then
41
+ cat <<EOF
42
+ {
43
+ "continue": true,
44
+ "systemMessage": "Slop detected: ${FINDINGS}"
45
+ }
46
+ EOF
47
+ fi
48
+
49
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uv-suite",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Portable framework for AI-assisted software development. 10 agents, 9 skills, 5 hooks, 4 personas. Works with Claude Code, Cursor, and Codex.",
5
5
  "author": "Utsav Anand",
6
6
  "license": "MIT",
@@ -105,11 +105,10 @@
105
105
  "statusMessage": "Auto-formatting..."
106
106
  },
107
107
  {
108
- "type": "prompt",
109
- "prompt": "Quickly scan the code that was just written or edited for the most obvious AI slop patterns: (1) comments that restate the code like '// Initialize the database' above initDatabase(), (2) try/catch around code that can't throw, (3) single-implementation interfaces or factories, (4) toBeTruthy()/toBeDefined() in tests. If you find any of these specific patterns, respond with {\"ok\": false, \"reason\": \"Slop detected: [specific finding with line reference]. Fix: [specific fix].\"} If the code is clean, respond with {\"ok\": true}. Only flag the most obvious violations — do not be overly strict.",
110
- "model": "claude-haiku-4-5",
111
- "timeout": 15,
112
- "statusMessage": "Checking for AI slop..."
108
+ "type": "command",
109
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/slop-grep.sh",
110
+ "timeout": 3,
111
+ "statusMessage": "Slop check..."
113
112
  }
114
113
  ]
115
114
  }
package/settings.json CHANGED
@@ -82,11 +82,10 @@
82
82
  "statusMessage": "Auto-formatting..."
83
83
  },
84
84
  {
85
- "type": "prompt",
86
- "prompt": "Quickly scan the code that was just written or edited for the most obvious AI slop patterns: (1) comments that restate the code like '// Initialize the database' above initDatabase(), (2) try/catch around code that can't throw, (3) single-implementation interfaces or factories, (4) toBeTruthy()/toBeDefined() in tests. If you find any of these specific patterns, respond with {\"ok\": false, \"reason\": \"Slop detected: [specific finding with line reference]. Fix: [specific fix].\"} If the code is clean, respond with {\"ok\": true}. Only flag the most obvious violations — do not be overly strict.",
87
- "model": "claude-haiku-4-5",
88
- "timeout": 15,
89
- "statusMessage": "Checking for AI slop..."
85
+ "type": "command",
86
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/slop-grep.sh",
87
+ "timeout": 3,
88
+ "statusMessage": "Slop check..."
90
89
  }
91
90
  ]
92
91
  }