All checks were successful
Publish ParaWiki / build-and-deploy (push) Successful in 29s
- PLAN.md · PROGRESS.md 도입: 병렬 에이전트 조정 지점 - CLAUDE.md 린화 + 에이전트 작업 흐름 섹션 (상세는 Output/guides/로 분리) - Output/guides/cimery-dev-guide.md, obsidian-cli.md 신설 - Agents: cimery-architect-researcher, adr-drafter - Commands: /plan, /progress, /adr, /research, /cimery-start - Skill: plan-commit - Hooks: raw/ 쓰기 차단, SessionStart PLAN/PROGRESS 주입, wiki/ADR 변경 시 log 갱신 알림, auto-approve (deny 훅 우선 유지) - .gitignore: .claude/ 공유 자산 포함, 로컬 상태·바이너리만 유지 제외 Closes #3 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
819 B
Bash
33 lines
819 B
Bash
#!/bin/bash
|
|
# PreToolUse(Write|Edit): block writes to raw/ directory
|
|
# Karpathy LLM Wiki rule #1: raw/ is immutable
|
|
|
|
json=$(cat)
|
|
|
|
# Extract file_path from JSON (works for Write, Edit, MultiEdit tools)
|
|
path=$(printf '%s' "$json" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
|
|
|
|
if [ -z "$path" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Normalize Windows backslashes to forward slashes
|
|
path_norm=$(printf '%s' "$path" | tr '\\' '/')
|
|
|
|
case "$path_norm" in
|
|
*/raw/*|raw/*)
|
|
cat <<'EOF'
|
|
{
|
|
"hookSpecificOutput": {
|
|
"hookEventName": "PreToolUse",
|
|
"permissionDecision": "deny",
|
|
"permissionDecisionReason": "raw/ is immutable (Karpathy LLM Wiki rule #1). Edit or place new sources via manual copy only."
|
|
}
|
|
}
|
|
EOF
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
exit 0
|