chore(claude): add repo conventions and agent guardrails
This commit is contained in:
1 parent
b56ea412de
commit
6d404e2b21
9 files changed
+411
No files matched your search
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"permissions": {
|
||||
"defaultMode": "plan",
|
||||
"disableAutoMode": "disable",
|
||||
"allow": [
|
||||
"Bash(.venv/bin/yamllint *)",
|
||||
"Bash(.venv/bin/ansible-lint *)",
|
||||
"Bash(.venv/bin/ansible-lint)",
|
||||
"Bash(ansible --version)",
|
||||
"Bash(ansible-doc *)",
|
||||
"Bash(git log *)",
|
||||
"Bash(git status *)",
|
||||
"Bash(git diff *)",
|
||||
"Bash(git show *)",
|
||||
"Bash(git grep *)",
|
||||
"Bash(git blame *)",
|
||||
"Bash(git ls-files *)",
|
||||
"Bash(git ls-tree *)",
|
||||
"Bash(git rev-parse *)",
|
||||
"Bash(git describe *)",
|
||||
"Bash(git shortlog *)",
|
||||
"Bash(git merge-base *)",
|
||||
"Bash(git reflog show *)",
|
||||
"Bash(git stash list *)",
|
||||
"Bash(git branch --list *)",
|
||||
"Bash(git branch -a *)",
|
||||
"Bash(git branch -v *)",
|
||||
"Bash(git tag --list *)",
|
||||
"Bash(git remote -v)",
|
||||
"Bash(git fetch *)",
|
||||
"Bash(git add *)",
|
||||
"Bash(git switch *)",
|
||||
"Bash(git commit *)",
|
||||
"Bash(git push *)",
|
||||
"Bash(ls *)",
|
||||
"Bash(pwd)",
|
||||
"Bash(wc *)",
|
||||
"Bash(which *)",
|
||||
"Bash(jq *)",
|
||||
"Bash(.claude/scripts/gitea.sh GET *)",
|
||||
"Bash(.claude/scripts/gitea.sh WAIT *)",
|
||||
"Bash(.claude/scripts/gitea.sh POST *)",
|
||||
"WebFetch(domain:docs.ansible.com)",
|
||||
"WebFetch(domain:docs.docker.com)",
|
||||
"WebFetch(domain:docs.gitea.com)",
|
||||
"WebFetch(domain:github.com)",
|
||||
"WebFetch(domain:raw.githubusercontent.com)"
|
||||
],
|
||||
"ask": [
|
||||
"Bash(ansible *)",
|
||||
"Bash(ansible-playbook *)",
|
||||
"Bash(ansible-pull *)",
|
||||
"Bash(ansible-console *)",
|
||||
"Bash(ansible-vault *)",
|
||||
"Bash(ssh *)",
|
||||
"Bash(scp *)",
|
||||
"Bash(sftp *)",
|
||||
"Bash(rsync *)",
|
||||
"Bash(docker *)",
|
||||
"Bash(pct *)",
|
||||
"Bash(qm *)",
|
||||
"Bash(curl *)",
|
||||
"Bash(.claude/scripts/gitea.sh POST */merge*)",
|
||||
"Bash(.claude/scripts/gitea.sh PATCH *)",
|
||||
"Bash(.claude/scripts/gitea.sh PUT *)",
|
||||
"Bash(.claude/scripts/gitea.sh DELETE *)"
|
||||
],
|
||||
"deny": [
|
||||
"Bash(env)",
|
||||
"Bash(printenv *)",
|
||||
"Bash(ansible-vault view *)",
|
||||
"Bash(ansible-vault decrypt *)",
|
||||
"Bash(*/etc/homelab-ansible*)",
|
||||
"Bash(*homelab-agent/token*)",
|
||||
"Read(**/.env)",
|
||||
"Read(**/.env.*)",
|
||||
"Read(**/vault.yml)",
|
||||
"Read(**/vault.yaml)",
|
||||
"Read(**/.vault_pass*)",
|
||||
"Read(//etc/homelab-ansible/**)",
|
||||
"Edit(//etc/homelab-ansible/**)",
|
||||
"Read(~/.config/homelab-agent/token)",
|
||||
"Edit(~/.config/homelab-agent/**)"
|
||||
]
|
||||
},
|
||||
"attribution": {
|
||||
"commit": "",
|
||||
"pr": ""
|
||||
},
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Bash",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/guard-live-infra.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check-on-stop.sh",
|
||||
"timeout": 300
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user