oh-my-customcode 0.16.0 → 0.16.1
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.
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "
|
|
10
|
+
"command": "bash .claude/hooks/scripts/stage-blocker.sh"
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"description": "Block Write/Edit tools during plan/verify/compound stages — only allow in implement stage"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Stage-blocking hook: blocks Write/Edit in non-implement stages
|
|
3
|
+
if [ -f /tmp/.claude-dev-stage ]; then
|
|
4
|
+
stage=$(cat /tmp/.claude-dev-stage | tr -d '[:space:]')
|
|
5
|
+
if [ -z "$stage" ]; then exit 0; fi
|
|
6
|
+
case "$stage" in
|
|
7
|
+
plan|verify-plan|verify-impl|compound|done)
|
|
8
|
+
echo "⛔ BLOCKED: Write/Edit disabled in '$stage' stage. Only allowed during 'implement' stage. Use 'echo implement > /tmp/.claude-dev-stage' to transition."
|
|
9
|
+
exit 2
|
|
10
|
+
;;
|
|
11
|
+
esac
|
|
12
|
+
fi
|