rd13_copilot_setup/docs/ADMIN.md
Conrad Schulz d31db9086f fix: alle --no-verify Referenzen entfernt + pre-commit Nummerierung
- docs/USER.md: --no-verify FAQ-Hinweis durch .copilot-no-tests/.copilot-no-docs ersetzt
- docs/ADMIN.md: Hook-pro-Commit-Deaktivierung und Troubleshooting-Eintrag bereinigt
- docs/MAINTAINER.md: Escape-Valve Formulierung durch Opt-out Beschreibung ersetzt
- copilot-instructions.md (beide): DoD 'oder Bypass bewusst begruendet' entfernt
- pre-commit: Check-Nummerierung [1/3]+[2/3] -> [1/4]+[2/4]
2026-06-02 17:38:34 +00:00

126 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Administrator-Handbuch rd13_copilot_setup
> Zielgruppe: **Administratoren & DevOps** Menschen, die das Setup deployen und auf Systemen verwalten.
---
## Systemvoraussetzungen
| Komponente | Anforderung |
|---|---|
| Git | ≥ 2.28 |
| Shell | POSIX sh (bash, dash) oder fish ≥ 3.x |
| VS Code / VS Code Server | beliebige aktuelle Version |
| OS | Linux oder macOS |
---
## Deployment auf einem neuen System
```bash
git clone <repo-url> ~/dotfiles/copilot-setup
cd ~/dotfiles/copilot-setup
bash scripts/deploy.sh # bash (macOS + Linux)
# oder
fish scripts/deploy.fish # fish (Linux)
```
### Was das Deploy-Skript tut
| Schritt | Was | Ziel |
|---|---|---|
| 1 | VS Code User-dir ermitteln | plattformspezifisch (Server / lokal / macOS) |
| 2 | `settings.json` deployen | `~/.vscode-server/data/User/` (oder Äquivalent) |
| 3 | Prompt Files deployen | `~/.vscode-server/data/User/prompts/` |
| 4 | Git-Templates deployen | `~/.git-templates/` inkl. Hooks, Docs, History-Template |
| 5 | Bootstrap-Skript installieren | `~/.local/bin/copilot-bootstrap.sh` |
| 6 | Git-Alias setzen | `~/.gitconfig``git init` ruft Bootstrap automatisch auf |
---
## Git-Templates verwalten
Die Templates unter `git-templates/` werden beim Deployen nach `~/.git-templates/` kopiert.
Sie werden bei **jedem** `git init` automatisch in neue Repos kopiert (via `init.templateDir`).
**Struktur nach Deploy:**
```
~/.git-templates/
├── .github/copilot-instructions.md
├── .vscode/settings.json
├── .vscode/extensions.json
├── hooks/
│ └── pre-commit ← Agent Quality Gate (ausführbar)
├── docs/
│ ├── USER.md
│ ├── ADMIN.md
│ └── MAINTAINER.md
└── history/
└── summary/
└── PROJECT_CONTEXT.md
```
---
## pre-commit Hook verwalten
Der Hook liegt in `git-templates/hooks/pre-commit` und wird automatisch deployed.
**Hook aktivieren in bestehenden Repos (manuell):**
```bash
cp ~/.git-templates/hooks/pre-commit /path/to/repo/.git/hooks/pre-commit
chmod +x /path/to/repo/.git/hooks/pre-commit
```
**Hook dauerhaft deaktivieren (pro Repo):**
```bash
chmod -x .git/hooks/pre-commit
```
---
## Bestehende Repos ausstatten
```bash
cd /path/to/existing-repo
copilot-bootstrap.sh
# oder von überall:
sh ~/.local/bin/copilot-bootstrap.sh /path/to/repo
```
Das Bootstrap-Skript legt idempotent an:
- `.github/copilot-instructions.md`
- `.vscode/settings.json` + `.vscode/extensions.json`
- `data/` (gitignored)
- `history/prompts/` (committed) + `history/summary/PROJECT_CONTEXT.md`
- `docs/USER.md`, `docs/ADMIN.md`, `docs/MAINTAINER.md`
- `.git/hooks/pre-commit`
- `.gitignore`-Einträge für `data/**/*`
---
## `~/.local/bin/` im PATH?
Das Bootstrap-Skript wird in `~/.local/bin/` installiert. Sicherstellen dass dieser Pfad im `$PATH` ist:
**bash/zsh** (`~/.bashrc` / `~/.zshrc`):
```bash
export PATH="$HOME/.local/bin:$PATH"
```
**fish** (`~/.config/fish/config.fish`):
```fish
fish_add_path ~/.local/bin
```
---
## Troubleshooting
| Problem | Ursache | Lösung |
|---|---|---|
| `copilot-bootstrap.sh: command not found` | `~/.local/bin` nicht im PATH | Siehe "PATH" oben |
| `git init` ruft Bootstrap nicht auf | Git-Alias nicht gesetzt | `deploy.sh` erneut ausführen |
| Hook schlägt fehl obwohl alles ok | Falsch-positiver Match | `.copilot-no-tests` oder `.copilot-no-docs` anlegen; oder Hook-Script prüfen |
| Hook nicht aktiv nach `git clone` | Hooks werden bei `clone` nicht kopiert | `copilot-bootstrap.sh` im geklonten Repo ausführen |