diff --git a/.claude/README.md b/.claude/README.md new file mode 100644 index 0000000..c8c8404 --- /dev/null +++ b/.claude/README.md @@ -0,0 +1,34 @@ +# .claude/ — Harness-Config fürs Multi-Agent-System + +`settings.json` ist **committed** (team-weit): jede Leader- wie Worker-Session in +diesem Repo bekommt dieselben Permissions. Persönliche Abweichungen gehören in +`settings.local.json` (gitignored). + +## Was die Permissions tun +- **`defaultMode: acceptEdits`** — Datei-Edits/Writes laufen ohne Prompt (Worker + schreiben Code in ihrem Paket frei). Ownership-Verstöße fängt das Ownership-Gate + beim Commit, nicht der Prompt. +- **allow** — die Gate-Skripte, git read+workflow (inkl. `git worktree`), `bash -n`, + `pytest`, `dvc`, `ollama`, `curl` (Gitea-API für PRs) und gängige Read-Utils. +- **deny** — `git push --force`/`-f`, `git clean -fd(x)`, `sudo rm`, katastrophale + `rm -rf /`/`~`. Hart blockiert, nicht nur Prompt. Alles übrige (z. B. ein + einzelnes `git reset --hard`) ist *nicht* allow-gelistet → es fragt nach. + +## Parallel arbeiten mit tmux + git worktree (empfohlen) +Ein Worker pro Paket in **eigenem Worktree + eigener tmux-Pane** — so kollidiert +nichts, und das Ownership-Gate hält die Grenzen sauber: + +```bash +# je Worker einen Worktree auf seinem Branch +git worktree add ../$(basename "$PWD")-W2 -b feat/w2-profiles main +git worktree add ../$(basename "$PWD")-W3 -b feat/w3-exporter main +# … dann in je einer tmux-Pane: +cd ../-W2 && claude # Inhalt von session-prompts/W2.md einfügen +``` + +Der **Leader** bleibt im Haupt-Checkout (Branch `main`/`integrate/*` → vom +Ownership-Gate ausgenommen), integriert die Worker-PRs und löst Konflikte. +Nach dem Mergen: `git worktree remove ../-W2`. + +> Optional global (persönlich, nicht hier): `teammateMode: "tmux"` in +> `~/.claude/settings.json`, falls du Claudes native Teammate-Spawns nutzt. diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..c3ab2ef --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://json.schemastore.org/claude-code-settings.json", + "env": { + "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1", + "CLAUDE_VERBOSE": "1" + }, + "outputStyle": "Explanatory", + "teammateMode": "tmux", + "prefercences": { + "tmuxSplitPanes": "true", + "responseFormat": "markdown" + }, + "permissions": { + "defaultMode": "acceptEdits", + "allow": [ + "Bash(cmake:*)", + "Bash(ctest:*)", + "Bash(nice:*)", + "Bash(./build/conformallab_tests:*)", + "Bash(./build/conformallab_cgal_tests:*)", + "Bash(bash scripts/quality/*)", + "Bash(bash scripts/*)", + "Bash(python3 scripts/*)", + "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(curl -s*)", + "Bash(curl:*)", + "Bash(bash scripts/gate-session-hygiene.sh:*)", + "Bash(bash scripts/gate-ownership.sh:*)", + "Bash(bash scripts/gate-doc-drift.sh:*)", + "Bash(bash scripts/metrics.sh:*)", + "Bash(bash scripts/init.sh:*)", + "Bash(bash scripts/build-models.sh:*)", + "Bash(bash scripts/setup-jetson.sh:*)", + "Bash(bash scripts/benchmark.sh:*)", + "Bash(bash -n:*)", + "Bash(pytest:*)", + "Bash(python -m pytest:*)", + "Bash(python3 -m pytest:*)", + "Bash(dvc:*)", + "Bash(ollama:*)", + "Bash(cat:*)", + "Bash(head:*)", + "Bash(tail:*)", + "Bash(awk:*)", + "Bash(jq:*)", + "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:*)" + ] + } +} diff --git a/.gitignore b/.gitignore index 99563ad..3d82945 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,8 @@ logs/ .DS_Store .idea/ .vscode/ + +# Persönliche Claude-Overrides bleiben lokal; .claude/settings.json IST committed (team-weit). +.claude/settings.local.json + # metrics/*.csv wird bewusst getrackt — die Observability-Story braucht den Trend.