2026-05-29 08:19:50 +00:00
|
|
|
|
# rd13_copilot_setup
|
|
|
|
|
|
|
|
|
|
|
|
GitHub Copilot Workspace-Konfiguration für maximale Produktivität – portierbar auf alle Maschinen und Repositories.
|
|
|
|
|
|
|
|
|
|
|
|
## Was ist das?
|
|
|
|
|
|
|
|
|
|
|
|
Dieses Repo enthält alle Konfigurationsdateien die nötig sind um GitHub Copilot wie ein Team aus Senior-Entwicklern arbeiten zu lassen:
|
|
|
|
|
|
|
|
|
|
|
|
- **User-Level Settings** – Copilot-Flags und Senior-Dev-Grundverhalten (per Settings Sync auf alle Geräte)
|
|
|
|
|
|
- **Prompt Files** – 9 wiederverwendbare Agent-Workflows (`/requirements`, `/new-feature`, `/architecture`, etc.)
|
2026-05-30 17:19:52 +00:00
|
|
|
|
- **Git-Templates** – automatisch in jedes neue Repo kopiert via `git init` (per Git-Alias)
|
|
|
|
|
|
- **Bootstrap-Skript** – bestehende und geclonte Repos in Sekunden ausstatten (POSIX sh, läuft überall)
|
2026-05-29 08:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Schnellstart
|
|
|
|
|
|
|
|
|
|
|
|
### Ersteinrichtung (Linux / macOS)
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
# 1. Repo klonen
|
|
|
|
|
|
git clone <this-repo> ~/dotfiles/copilot-setup
|
|
|
|
|
|
cd ~/dotfiles/copilot-setup
|
|
|
|
|
|
|
|
|
|
|
|
# 2. Deploy-Skript ausführen
|
|
|
|
|
|
bash scripts/deploy.sh # macOS (bash)
|
|
|
|
|
|
fish scripts/deploy.fish # Linux mit fish
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Das Skript legt alles an den richtigen Orten ab.
|
|
|
|
|
|
|
|
|
|
|
|
### Bestehende oder geclonte Repos ausstatten
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
cd /path/to/existing-repo
|
2026-05-30 17:19:52 +00:00
|
|
|
|
copilot-bootstrap.sh
|
2026-05-29 08:19:50 +00:00
|
|
|
|
# → legt .github/copilot-instructions.md + .vscode/ an, überschreibt nichts
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### VS Code Settings Sync aktivieren (einmalig pro Gerät)
|
|
|
|
|
|
|
|
|
|
|
|
`Ctrl+Shift+P` → **Settings Sync: Turn On** → Mit GitHub-Account einloggen → Alle Elemente auswählen
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Struktur
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
rd13_copilot_setup/
|
|
|
|
|
|
├── user-settings/
|
|
|
|
|
|
│ └── settings.json ← In ~/.config/Code/User/settings.json (Linux)
|
|
|
|
|
|
│ oder ~/Library/Application Support/Code/User/ (macOS)
|
|
|
|
|
|
├── prompts/ ← In VS Code User/prompts/ ablegen (Settings Sync)
|
|
|
|
|
|
│ ├── requirements.prompt.md /requirements – Requirements Engineering Workshop
|
|
|
|
|
|
│ ├── architecture.prompt.md /architecture – Architektur-Review + ADR erstellen
|
|
|
|
|
|
│ ├── new-feature.prompt.md /new-feature – Vollständiger Feature-Workflow
|
|
|
|
|
|
│ ├── code-review.prompt.md /code-review – Security + Qualitäts-Review
|
|
|
|
|
|
│ ├── debug.prompt.md /debug – Root-Cause-Analyse + Fix
|
|
|
|
|
|
│ ├── refactor.prompt.md /refactor – Refactoring ohne Behavior-Change
|
|
|
|
|
|
│ ├── write-tests.prompt.md /write-tests – Test-Generierung
|
|
|
|
|
|
│ ├── done-check.prompt.md /done-check – Definition of Done Checkliste
|
2026-05-30 17:19:52 +00:00
|
|
|
|
│ ├── docker.prompt.md /docker – Docker/Compose-Aufgaben
|
|
|
|
|
|
│ └── history.prompt.md /history – Agent-History loggen + Kontext aktualisieren
|
2026-05-29 08:19:50 +00:00
|
|
|
|
├── git-templates/ ← Wird via git config --global init.templateDir gesetzt
|
|
|
|
|
|
│ ├── .github/
|
2026-05-30 17:19:52 +00:00
|
|
|
|
│ │ └── copilot-instructions.md ← Template mit TODO-Feldern + Konventionen
|
|
|
|
|
|
│ ├── .vscode/
|
|
|
|
|
|
│ │ ├── settings.json
|
|
|
|
|
|
│ │ └── extensions.json
|
|
|
|
|
|
│ ├── hooks/
|
|
|
|
|
|
│ │ └── pre-commit ← Agent Quality Gate (Tests + Doku-Check)
|
|
|
|
|
|
│ ├── docs/
|
|
|
|
|
|
│ │ ├── USER.md ← Template: Endnutzer-Dokumentation
|
|
|
|
|
|
│ │ ├── ADMIN.md ← Template: Administrator-Dokumentation
|
|
|
|
|
|
│ │ └── MAINTAINER.md ← Template: Entwickler-Dokumentation
|
|
|
|
|
|
│ └── history/
|
|
|
|
|
|
│ └── summary/
|
|
|
|
|
|
│ └── PROJECT_CONTEXT.md ← Template: Agent-Kontext-Summary
|
|
|
|
|
|
├── docs/
|
|
|
|
|
|
│ ├── USER.md ← Benutzerhandbuch (Einrichtung + Nutzung)
|
|
|
|
|
|
│ ├── ADMIN.md ← Administrator-Handbuch (Deploy, Hooks, PATH)
|
|
|
|
|
|
│ └── MAINTAINER.md ← Architektur, Designentscheidungen, Erweiterung
|
2026-05-29 08:19:50 +00:00
|
|
|
|
└── scripts/
|
2026-05-30 17:19:52 +00:00
|
|
|
|
├── deploy.sh ← Deployment-Skript (bash, für macOS + Linux)
|
2026-05-29 08:19:50 +00:00
|
|
|
|
├── deploy.fish ← Deployment-Skript (fish, für Linux)
|
2026-05-30 17:19:52 +00:00
|
|
|
|
├── copilot-bootstrap.sh ← Einzelnes Repo ausstatten (POSIX sh, portabel)
|
|
|
|
|
|
└── copilot-bootstrap.fish ← Einzelnes Repo ausstatten (fish, legacy)
|
2026-05-29 08:19:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Architektur: 3-Schichten-Modell
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
┌─────────────────────────────────────────────────────────┐
|
|
|
|
|
|
│ Layer 1: Immer aktiv (User settings.json) │
|
|
|
|
|
|
│ • 9 Senior-Dev-Grundregeln in codeGeneration.instructions│
|
|
|
|
|
|
│ • Commit-Format, Review-Standard, Test-Standard │
|
|
|
|
|
|
│ • Copilot Feature-Flags │
|
|
|
|
|
|
├─────────────────────────────────────────────────────────┤
|
|
|
|
|
|
│ Layer 2: Auf Abruf (Prompt Files) │
|
|
|
|
|
|
│ • /requirements /architecture /new-feature │
|
|
|
|
|
|
│ • /code-review /debug /refactor │
|
|
|
|
|
|
│ • /write-tests /done-check /docker │
|
|
|
|
|
|
├─────────────────────────────────────────────────────────┤
|
|
|
|
|
|
│ Layer 3: Repo-spezifisch (.github/copilot-instructions) │
|
|
|
|
|
|
│ • Stack, Konventionen, ADR-Entscheidungen │
|
|
|
|
|
|
│ • Definition of Done für dieses Projekt │
|
|
|
|
|
|
│ • NFRs (Performance, Availability, Security) │
|
|
|
|
|
|
└─────────────────────────────────────────────────────────┘
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
**Layer 1** gilt automatisch für jede Anfrage ohne Prompt-File.
|
|
|
|
|
|
**Layer 2** wird per `/prompt-name` im Chat aufgerufen.
|
|
|
|
|
|
**Layer 3** ist git-tracked, liegt im Repo und wird von Copilot automatisch geladen.
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-30 17:19:52 +00:00
|
|
|
|
## Was jedes Repo automatisch bekommt
|
|
|
|
|
|
|
|
|
|
|
|
Nach `git init` (via Alias) oder `copilot-bootstrap.sh`:
|
|
|
|
|
|
|
|
|
|
|
|
| Was | Wo |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| Copilot-Anweisungen + Konventionen | `.github/copilot-instructions.md` |
|
|
|
|
|
|
| VS Code-Einstellungen | `.vscode/` |
|
|
|
|
|
|
| **pre-commit Quality Gate** | `.git/hooks/pre-commit` |
|
|
|
|
|
|
| **Persistente Daten (gitignored)** | `data/` |
|
|
|
|
|
|
| **Agent-Konversationen (gitignored)** | `history/prompts/` |
|
|
|
|
|
|
| **Agent-Kontext-Summary (committed)** | `history/summary/PROJECT_CONTEXT.md` |
|
|
|
|
|
|
| **Endnutzer-Dokumentation** | `docs/USER.md` |
|
|
|
|
|
|
| **Administrator-Dokumentation** | `docs/ADMIN.md` |
|
|
|
|
|
|
| **Entwickler-Dokumentation** | `docs/MAINTAINER.md` |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-29 08:19:50 +00:00
|
|
|
|
## Prompt Files – Wann was verwenden
|
|
|
|
|
|
|
|
|
|
|
|
| Prompt | Aufruf | Wann verwenden |
|
|
|
|
|
|
|---|---|---|
|
|
|
|
|
|
| `requirements` | `/requirements` | Vor dem Start – User Stories, ACs, NFRs erarbeiten |
|
|
|
|
|
|
| `architecture` | `/architecture` | Bei nicht-trivialen Entscheidungen → ADR erstellen |
|
|
|
|
|
|
| `new-feature` | `/new-feature` | Feature starten – alle 5 Phasen von Req bis Commit |
|
|
|
|
|
|
| `code-review` | `/code-review` | Vor dem Merge – OWASP + Qualität + Performance |
|
|
|
|
|
|
| `debug` | `/debug` | Bug analysieren – Root Cause, kein Symptom-Fix |
|
|
|
|
|
|
| `refactor` | `/refactor` | Code verbessern ohne Behavior-Change |
|
|
|
|
|
|
| `write-tests` | `/write-tests` | Test-Coverage-Lücken schließen |
|
|
|
|
|
|
| `done-check` | `/done-check` | Abnahme-Check vor dem Merge (7-Punkte-Checkliste) |
|
|
|
|
|
|
| `docker` | `/docker` | Docker/Compose analysieren, debuggen, erweitern |
|
2026-05-30 17:19:52 +00:00
|
|
|
|
| `history` | `/history` | Agent-Session loggen + Kontext-Summary aktualisieren |
|
2026-05-29 08:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Neues Repo einrichten – Checkliste
|
|
|
|
|
|
|
2026-05-30 17:19:52 +00:00
|
|
|
|
Nach `git init` (mit eingerichtetem Alias) passiert alles **automatisch**.
|
|
|
|
|
|
|
|
|
|
|
|
Nach `git clone` oder ohne Alias:
|
2026-05-29 08:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
# Option A: Bootstrap-Skript (empfohlen)
|
2026-05-30 17:19:52 +00:00
|
|
|
|
copilot-bootstrap.sh
|
2026-05-29 08:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
# Option B: Manuell
|
|
|
|
|
|
mkdir -p .github .vscode
|
2026-05-30 17:19:52 +00:00
|
|
|
|
cp ~/.git-templates/.github/copilot-instructions.md .github/
|
|
|
|
|
|
cp ~/.git-templates/.vscode/settings.json .vscode/
|
|
|
|
|
|
cp ~/.git-templates/.vscode/extensions.json .vscode/
|
2026-05-29 08:19:50 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Danach: TODO-Felder in `.github/copilot-instructions.md` ausfüllen.
|
|
|
|
|
|
|
2026-05-30 17:19:52 +00:00
|
|
|
|
→ Detaillierte Anleitungen: [docs/USER.md](docs/USER.md) | [docs/MAINTAINER.md](docs/MAINTAINER.md)
|
|
|
|
|
|
|
2026-05-29 08:19:50 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## .github/copilot-instructions.md ausfüllen
|
|
|
|
|
|
|
|
|
|
|
|
Die wichtigsten Felder:
|
|
|
|
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
|
|
## Project
|
|
|
|
|
|
[1-2 Sätze was das Projekt macht]
|
|
|
|
|
|
|
|
|
|
|
|
## Stack
|
|
|
|
|
|
- Language: TypeScript / Python / Go / ...
|
|
|
|
|
|
- Framework: Next.js / FastAPI / ...
|
|
|
|
|
|
- Database: PostgreSQL / Redis / ...
|
|
|
|
|
|
|
|
|
|
|
|
## Architecture
|
|
|
|
|
|
- Pattern: Hexagonal / MVC / Event-driven
|
|
|
|
|
|
- Key constraints: [z.B. "stateless services", "no ORM"]
|
|
|
|
|
|
|
|
|
|
|
|
## Conventions
|
|
|
|
|
|
- Branch: feat/<ticket>-description
|
|
|
|
|
|
- Commits: Conventional Commits
|
|
|
|
|
|
- Naming: camelCase functions, PascalCase classes
|
|
|
|
|
|
|
|
|
|
|
|
## Non-Functional Requirements
|
|
|
|
|
|
- Response time: <200ms p95
|
|
|
|
|
|
- Availability: 99.9%
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Je mehr Kontext hier steht, desto besser arbeitet Copilot ohne Nachfragen.
|