chore(claude): add project harness config (permissions for uv/ruff/mypy/podman)
codex-py hatte kein .claude/ — F-xx-Worker liefen mit nackten globalen Settings und wurden bei jedem uv/ruff/mypy/pytest/git-Befehl geprompted. settings.json spiegelt den knowledge-base-Stil (acceptEdits + harter deny-Block), zugeschnitten auf den Python/uv-Stack + podman (DB) + ollama. settings.local.json gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
21
.claude/README.md
Normal file
21
.claude/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# .claude/ — Harness-Config für codex-py
|
||||||
|
|
||||||
|
`settings.json` ist **committed** (team-weit): jede Worker-Session in diesem Repo
|
||||||
|
bekommt dieselben Permissions. Persönliche Abweichungen gehören in
|
||||||
|
`settings.local.json` (gitignored).
|
||||||
|
|
||||||
|
## Was die Permissions tun
|
||||||
|
- **`defaultMode: acceptEdits`** — Edits/Writes ohne Prompt (Worker schreiben Code
|
||||||
|
in ihrem F-XX-Paket frei). Disjunkte Ownership je Paket (siehe knowledge-base
|
||||||
|
`STATE.md`); Konflikte löst der Leader bei der Integration.
|
||||||
|
- **allow** — die Dev-Toolchain (`uv`, `ruff`, `mypy`, `pytest`, `python`), git
|
||||||
|
read+workflow, `podman` (lokale pgvector-DB), `ollama` (lokales LLM), `curl`
|
||||||
|
(API-Tests, z. B. OpenAlex) und gängige Read-Utils.
|
||||||
|
- **deny** — `git push --force`/`-f`, `git clean -fd(x)`, `sudo rm`, katastrophale
|
||||||
|
`rm -rf /`/`~`. Hart blockiert. Alles übrige (z. B. `git reset --hard`) ist
|
||||||
|
*nicht* allow-gelistet → es fragt nach.
|
||||||
|
|
||||||
|
## Hinweis
|
||||||
|
Gespiegelt am Stil der knowledge-base-`.claude/`, aber auf den Python/uv-Stack
|
||||||
|
zugeschnitten. Tests laufen via `uv run pytest`; falls `uv run` die Umgebung
|
||||||
|
neu-synct, ist `.venv/bin/python` ebenfalls allow-gelistet.
|
||||||
80
.claude/settings.json
Normal file
80
.claude/settings.json
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
||||||
|
"env": {
|
||||||
|
"CLAUDE_VERBOSE": "1"
|
||||||
|
},
|
||||||
|
"outputStyle": "Explanatory",
|
||||||
|
"permissions": {
|
||||||
|
"defaultMode": "acceptEdits",
|
||||||
|
"allow": [
|
||||||
|
"Bash(uv:*)",
|
||||||
|
"Bash(ruff:*)",
|
||||||
|
"Bash(mypy:*)",
|
||||||
|
"Bash(pytest:*)",
|
||||||
|
"Bash(python -m pytest:*)",
|
||||||
|
"Bash(python3 -m pytest:*)",
|
||||||
|
"Bash(python:*)",
|
||||||
|
"Bash(python3:*)",
|
||||||
|
"Bash(.venv/bin/python:*)",
|
||||||
|
"Bash(podman:*)",
|
||||||
|
"Bash(ollama:*)",
|
||||||
|
"Bash(codespell:*)",
|
||||||
|
"Bash(shellcheck:*)",
|
||||||
|
"Bash(git status:*)",
|
||||||
|
"Bash(git diff:*)",
|
||||||
|
"Bash(git log:*)",
|
||||||
|
"Bash(git show:*)",
|
||||||
|
"Bash(git branch:*)",
|
||||||
|
"Bash(git ls-remote:*)",
|
||||||
|
"Bash(git ls-files:*)",
|
||||||
|
"Bash(git remote:*)",
|
||||||
|
"Bash(git rev-parse:*)",
|
||||||
|
"Bash(git rev-list:*)",
|
||||||
|
"Bash(git merge-base:*)",
|
||||||
|
"Bash(git diff-tree:*)",
|
||||||
|
"Bash(git describe:*)",
|
||||||
|
"Bash(git tag:*)",
|
||||||
|
"Bash(git add:*)",
|
||||||
|
"Bash(git commit:*)",
|
||||||
|
"Bash(git switch:*)",
|
||||||
|
"Bash(git checkout:*)",
|
||||||
|
"Bash(git restore:*)",
|
||||||
|
"Bash(git stash:*)",
|
||||||
|
"Bash(git fetch:*)",
|
||||||
|
"Bash(git pull:*)",
|
||||||
|
"Bash(git push:*)",
|
||||||
|
"Bash(git merge:*)",
|
||||||
|
"Bash(git rebase:*)",
|
||||||
|
"Bash(git worktree:*)",
|
||||||
|
"Bash(git init:*)",
|
||||||
|
"Bash(git mv:*)",
|
||||||
|
"Bash(ls:*)",
|
||||||
|
"Bash(find:*)",
|
||||||
|
"Bash(grep:*)",
|
||||||
|
"Bash(rg:*)",
|
||||||
|
"Bash(wc:*)",
|
||||||
|
"Bash(cat:*)",
|
||||||
|
"Bash(head:*)",
|
||||||
|
"Bash(tail:*)",
|
||||||
|
"Bash(awk:*)",
|
||||||
|
"Bash(jq:*)",
|
||||||
|
"Bash(curl:*)",
|
||||||
|
"Bash(mkdir:*)",
|
||||||
|
"Bash(cp:*)",
|
||||||
|
"Bash(test:*)",
|
||||||
|
"Bash(echo:*)",
|
||||||
|
"Bash(true)"
|
||||||
|
],
|
||||||
|
"deny": [
|
||||||
|
"Bash(git push --force:*)",
|
||||||
|
"Bash(git push -f:*)",
|
||||||
|
"Bash(git clean -fdx:*)",
|
||||||
|
"Bash(git clean -fd:*)",
|
||||||
|
"Bash(rm -rf /)",
|
||||||
|
"Bash(rm -rf /*)",
|
||||||
|
"Bash(rm -rf ~)",
|
||||||
|
"Bash(rm -rf ~/*)",
|
||||||
|
"Bash(sudo rm:*)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -33,3 +33,6 @@ htmlcov/
|
|||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
|
# Claude Code — settings.json IS committed (team-wide); only personal overrides ignored
|
||||||
|
.claude/settings.local.json
|
||||||
|
|||||||
Reference in New Issue
Block a user