fix(plugin): remove block-docs hook — was blocking specs and RFCs
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
670e4c9a10
commit
cce41faa39
2 changed files with 0 additions and 47 deletions
|
|
@ -12,16 +12,6 @@
|
|||
],
|
||||
"description": "Block destructive commands (rm -rf, sed -i, xargs rm) and enforce core CLI"
|
||||
},
|
||||
{
|
||||
"matcher": "Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/block-docs.sh"
|
||||
}
|
||||
],
|
||||
"description": "Block random .md file creation"
|
||||
}
|
||||
],
|
||||
"PostToolUse": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Block creation of random .md files - keeps docs consolidated
|
||||
|
||||
read -r input
|
||||
FILE_PATH=$(echo "$input" | jq -r '.tool_input.file_path // empty')
|
||||
|
||||
if [[ -n "$FILE_PATH" ]]; then
|
||||
# Allow known documentation files
|
||||
case "$FILE_PATH" in
|
||||
*README.md|*CLAUDE.md|*AGENTS.md|*CONTRIBUTING.md|*CHANGELOG.md|*LICENSE.md)
|
||||
echo "$input"
|
||||
exit 0
|
||||
;;
|
||||
# Allow docs/ directory
|
||||
*/docs/*.md|*/docs/**/*.md)
|
||||
echo "$input"
|
||||
exit 0
|
||||
;;
|
||||
# Allow Claude memory and plan files
|
||||
*/.claude/*.md|*/.claude/**/*.md)
|
||||
echo "$input"
|
||||
exit 0
|
||||
;;
|
||||
# Allow plugin development (commands, skills)
|
||||
*/commands/*.md|*/skills/*.md|*/skills/**/*.md)
|
||||
echo "$input"
|
||||
exit 0
|
||||
;;
|
||||
# Block other .md files
|
||||
*.md)
|
||||
echo '{"decision": "block", "message": "Use README.md or docs/ for documentation. Random .md files clutter the repo."}'
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "$input"
|
||||
Loading…
Add table
Reference in a new issue