fix: --no-verify komplett entfernt aus pre-commit + .copilot-no-tests
- pre-commit: alle --no-verify Hinweise aus Fehlermeldungen entfernt - pre-commit: .copilot-no-tests Opt-out fuer Repos ohne Test-Framework (Check 1) - .copilot-no-tests angelegt: dieses Setup-Repo hat kein Test-Framework - copilot-instructions.md: no-verify + force-push explizit verboten - README: Templates-Update Sektion + neue Scripts dokumentiert
This commit is contained in:
parent
3b34074556
commit
eb19cf7e99
6 changed files with 103 additions and 12 deletions
0
.copilot-no-tests
Normal file
0
.copilot-no-tests
Normal file
8
.github/copilot-instructions.md
vendored
8
.github/copilot-instructions.md
vendored
|
|
@ -19,6 +19,14 @@
|
||||||
> Die History ist das Gedächtnis des Projekts.
|
> Die History ist das Gedächtnis des Projekts.
|
||||||
> **Hinweis:** Das Erstellen der Session-Datei erfordert expliziten Aufruf via `/history`.
|
> **Hinweis:** Das Erstellen der Session-Datei erfordert expliziten Aufruf via `/history`.
|
||||||
|
|
||||||
|
## ⛔ Verbotene Aktionen (NIEMALS ausführen)
|
||||||
|
|
||||||
|
- **`git commit --no-verify`** – Der pre-commit Quality Gate darf NIEMALS umgangen werden.
|
||||||
|
Wenn der Hook fehlschlägt: Problem beheben (Tests schreiben, Doku aktualisieren, Context aktualisieren).
|
||||||
|
Einzige Ausnahme: Der User fordert es explizit und begründet es.
|
||||||
|
- **`git push --force`** – Nie force-pushen ohne explizite Anweisung des Users.
|
||||||
|
- **Secrets in Code** – Keine Passwörter, API-Keys, Tokens in Dateien.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Project
|
## Project
|
||||||
|
|
|
||||||
58
README.md
58
README.md
|
|
@ -7,9 +7,44 @@ GitHub Copilot Workspace-Konfiguration für maximale Produktivität – portierb
|
||||||
Dieses Repo enthält alle Konfigurationsdateien die nötig sind um GitHub Copilot wie ein Team aus Senior-Entwicklern arbeiten zu lassen:
|
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)
|
- **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.)
|
- **Prompt Files** – 10 wiederverwendbare Agent-Workflows (`/requirements`, `/new-feature`, `/architecture`, etc.)
|
||||||
- **Git-Templates** – automatisch in jedes neue Repo kopiert via `git init` (per Git-Alias)
|
- **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)
|
- **Bootstrap-Skript** – bestehende und geclonte Repos in Sekunden ausstatten (POSIX sh, läuft überall)
|
||||||
|
- **Update-Mechanismus** – Templates und Prompts in allen Repos mit einem Befehl aktuell halten: `git copilot-update`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Templates aktuell halten – neuer Standard
|
||||||
|
|
||||||
|
Nach der Ersteinrichtung gibt es einen einzigen Befehl um alle Templates, Prompt-Dateien
|
||||||
|
und Git-Hooks in einem Repo auf den neuesten Stand zu bringen:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git copilot-update
|
||||||
|
```
|
||||||
|
|
||||||
|
Was das macht:
|
||||||
|
1. **Setup-Repo pullen** – `~/.copilot-setup/` (SSH, HTTP-Fallback zu `http://192.168.178.6:8083/cschulz/rd13_copilot_setup`)
|
||||||
|
2. **Globale Templates updaten** – `~/.git-templates/` + VS Code Prompt-Dateien
|
||||||
|
3. **Repo-lokale Hooks updaten** – `.git/hooks/pre-commit` + `post-commit`
|
||||||
|
4. **`copilot-instructions.md`** – nur überschreiben wenn noch TODO-Platzhalter enthalten (Backup `.bak` wird angelegt)
|
||||||
|
|
||||||
|
> **Empfehlung:** In jedem Repo nach einem `git pull` auf dem Setup-Repo ausführen,
|
||||||
|
> oder wenn ein neues Feature-Prompt oder eine Hook-Verbesserung verfügbar ist.
|
||||||
|
|
||||||
|
### Auto-Update für das Setup-Repo selbst
|
||||||
|
|
||||||
|
Nach `deploy.sh` ist im Setup-Repo selbst ein `post-merge` Hook aktiv:
|
||||||
|
```bash
|
||||||
|
git pull # im Setup-Repo → deploy.sh läuft automatisch → alle Templates sofort aktuell
|
||||||
|
```
|
||||||
|
|
||||||
|
### Opt-in: Auto-Update in anderen Repos nach git pull
|
||||||
|
|
||||||
|
```bash
|
||||||
|
copilot-bootstrap.sh --with-update-hook /pfad/zum/repo
|
||||||
|
# → installiert post-merge Hook: git pull → git copilot-update
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -34,7 +69,10 @@ Das Skript legt alles an den richtigen Orten ab.
|
||||||
```bash
|
```bash
|
||||||
cd /path/to/existing-repo
|
cd /path/to/existing-repo
|
||||||
copilot-bootstrap.sh
|
copilot-bootstrap.sh
|
||||||
# → legt .github/copilot-instructions.md + .vscode/ an, überschreibt nichts
|
# → legt .github/copilot-instructions.md + .vscode/ + Hooks an, überschreibt nichts
|
||||||
|
|
||||||
|
# Mit opt-in Auto-Update nach git pull:
|
||||||
|
copilot-bootstrap.sh --with-update-hook
|
||||||
```
|
```
|
||||||
|
|
||||||
### VS Code Settings Sync aktivieren (einmalig pro Gerät)
|
### VS Code Settings Sync aktivieren (einmalig pro Gerät)
|
||||||
|
|
@ -68,7 +106,9 @@ rd13_copilot_setup/
|
||||||
│ │ ├── settings.json
|
│ │ ├── settings.json
|
||||||
│ │ └── extensions.json
|
│ │ └── extensions.json
|
||||||
│ ├── hooks/
|
│ ├── hooks/
|
||||||
│ │ └── pre-commit ← Agent Quality Gate (Tests + Doku-Check)
|
│ │ ├── pre-commit ← Agent Quality Gate (Tests + Doku-Check)
|
||||||
|
│ │ ├── post-commit ← Automatischer History-Log nach jedem Commit
|
||||||
|
│ │ └── post-merge ← Opt-in: copilot-update nach git pull
|
||||||
│ ├── docs/
|
│ ├── docs/
|
||||||
│ │ ├── USER.md ← Template: Endnutzer-Dokumentation
|
│ │ ├── USER.md ← Template: Endnutzer-Dokumentation
|
||||||
│ │ ├── ADMIN.md ← Template: Administrator-Dokumentation
|
│ │ ├── ADMIN.md ← Template: Administrator-Dokumentation
|
||||||
|
|
@ -84,7 +124,9 @@ rd13_copilot_setup/
|
||||||
├── deploy.sh ← Deployment-Skript (bash, für macOS + Linux)
|
├── deploy.sh ← Deployment-Skript (bash, für macOS + Linux)
|
||||||
├── deploy.fish ← Deployment-Skript (fish, für Linux)
|
├── deploy.fish ← Deployment-Skript (fish, für Linux)
|
||||||
├── copilot-bootstrap.sh ← Einzelnes Repo ausstatten (POSIX sh, portabel)
|
├── copilot-bootstrap.sh ← Einzelnes Repo ausstatten (POSIX sh, portabel)
|
||||||
└── copilot-bootstrap.fish ← Einzelnes Repo ausstatten (fish, legacy)
|
├── copilot-bootstrap.fish ← Einzelnes Repo ausstatten (fish)
|
||||||
|
├── copilot-update.sh ← Templates + Hooks in allen Repos updaten (POSIX sh)
|
||||||
|
└── copilot-update.fish ← Templates + Hooks in allen Repos updaten (fish)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -125,6 +167,7 @@ Nach `git init` (via Alias) oder `copilot-bootstrap.sh`:
|
||||||
| Copilot-Anweisungen + Konventionen | `.github/copilot-instructions.md` |
|
| Copilot-Anweisungen + Konventionen | `.github/copilot-instructions.md` |
|
||||||
| VS Code-Einstellungen | `.vscode/` |
|
| VS Code-Einstellungen | `.vscode/` |
|
||||||
| **pre-commit Quality Gate** | `.git/hooks/pre-commit` |
|
| **pre-commit Quality Gate** | `.git/hooks/pre-commit` |
|
||||||
|
| **post-commit History-Log** | `.git/hooks/post-commit` |
|
||||||
| **Persistente Daten (gitignored)** | `data/` |
|
| **Persistente Daten (gitignored)** | `data/` |
|
||||||
| **Agent-Konversationen (committed)** | `history/prompts/` |
|
| **Agent-Konversationen (committed)** | `history/prompts/` |
|
||||||
| **Agent-Kontext-Summary (committed)** | `history/summary/PROJECT_CONTEXT.md` |
|
| **Agent-Kontext-Summary (committed)** | `history/summary/PROJECT_CONTEXT.md` |
|
||||||
|
|
@ -161,6 +204,9 @@ Nach `git clone` oder ohne Alias:
|
||||||
# Option A: Bootstrap-Skript (empfohlen)
|
# Option A: Bootstrap-Skript (empfohlen)
|
||||||
copilot-bootstrap.sh
|
copilot-bootstrap.sh
|
||||||
|
|
||||||
|
# Option A+: Mit opt-in Auto-Update-Hook (copilot-update nach jedem git pull)
|
||||||
|
copilot-bootstrap.sh --with-update-hook
|
||||||
|
|
||||||
# Option B: Manuell
|
# Option B: Manuell
|
||||||
mkdir -p .github .vscode
|
mkdir -p .github .vscode
|
||||||
cp ~/.git-templates/.github/copilot-instructions.md .github/
|
cp ~/.git-templates/.github/copilot-instructions.md .github/
|
||||||
|
|
@ -168,7 +214,9 @@ cp ~/.git-templates/.vscode/settings.json .vscode/
|
||||||
cp ~/.git-templates/.vscode/extensions.json .vscode/
|
cp ~/.git-templates/.vscode/extensions.json .vscode/
|
||||||
```
|
```
|
||||||
|
|
||||||
Danach: TODO-Felder in `.github/copilot-instructions.md` ausfüllen.
|
Danach:
|
||||||
|
1. TODO-Felder in `.github/copilot-instructions.md` ausfüllen
|
||||||
|
2. `git copilot-update` – stellt sicher dass alle Hooks auf dem neuesten Stand sind
|
||||||
|
|
||||||
→ Detaillierte Anleitungen: [docs/USER.md](docs/USER.md) | [docs/MAINTAINER.md](docs/MAINTAINER.md)
|
→ Detaillierte Anleitungen: [docs/USER.md](docs/USER.md) | [docs/MAINTAINER.md](docs/MAINTAINER.md)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@
|
||||||
> Die History ist das Gedächtnis des Projekts.
|
> Die History ist das Gedächtnis des Projekts.
|
||||||
> **Hinweis:** Das Erstellen der Session-Datei erfordert expliziten Aufruf via `/history`.
|
> **Hinweis:** Das Erstellen der Session-Datei erfordert expliziten Aufruf via `/history`.
|
||||||
|
|
||||||
|
## ⛔ Verbotene Aktionen (NIEMALS ausführen)
|
||||||
|
|
||||||
|
- **`git commit --no-verify`** – Der pre-commit Quality Gate darf NIEMALS umgangen werden.
|
||||||
|
Wenn der Hook fehlschlägt: Problem beheben (Tests schreiben, Doku aktualisieren, Context aktualisieren).
|
||||||
|
Einzige Ausnahme: Der User fordert es explizit und begründet es.
|
||||||
|
- **`git push --force`** – Nie force-pushen ohne explizite Anweisung des Users.
|
||||||
|
- **Secrets in Code** – Keine Passwörter, API-Keys, Tokens in Dateien.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Project
|
## Project
|
||||||
|
|
|
||||||
|
|
@ -25,17 +25,20 @@ if [ -z "$CODE_CHANGED" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Check 1: Tests ────────────────────────────────────────────────────────────
|
# ── Check 1: Tests ────────────────────────────────────────────────────────────
|
||||||
|
# Opt-out: Datei '.copilot-no-tests' im Repo-Root deaktiviert diesen Check
|
||||||
|
# (für Repos ohne Test-Framework, z.B. reine Script/Config-Repos)
|
||||||
TESTS_CHANGED=$(printf '%s\n' "$STAGED" \
|
TESTS_CHANGED=$(printf '%s\n' "$STAGED" \
|
||||||
| grep -E '(test|spec|__tests__|_test)\.(py|js|ts|mjs|go|java|rs|rb|php|c|cpp|cs|kt|swift)$|_test\.go$|test_.*\.py$')
|
| grep -E '(test|spec|__tests__|_test)\.(py|js|ts|mjs|go|java|rs|rb|php|c|cpp|cs|kt|swift)$|_test\.go$|test_.*\.py$')
|
||||||
|
|
||||||
if [ -z "$TESTS_CHANGED" ]; then
|
if [ -z "$TESTS_CHANGED" ] && [ ! -f ".copilot-no-tests" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "✗ AGENT QUALITY GATE [1/3]: Keine Test-Dateien geändert"
|
echo "✗ AGENT QUALITY GATE [1/3]: Keine Test-Dateien geändert"
|
||||||
echo " Code-Änderungen ohne Test-Updates:"
|
echo " Code-Änderungen ohne Test-Updates:"
|
||||||
printf '%s\n' "$CODE_CHANGED" | sed 's/^/ /'
|
printf '%s\n' "$CODE_CHANGED" | sed 's/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo " → Tests fehlen oder nicht als STAGED markiert"
|
echo " → Tests fehlen oder nicht als STAGED markiert"
|
||||||
echo " → Copilot Chat: /write-tests | Bypass: git commit --no-verify"
|
echo " → Copilot Chat: /write-tests"
|
||||||
|
echo " → Kein Test-Framework vorhanden? Datei '.copilot-no-tests' anlegen um diesen Check zu deaktivieren"
|
||||||
ERRORS=$((ERRORS + 1))
|
ERRORS=$((ERRORS + 1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -55,7 +58,6 @@ if [ -d "docs" ]; then
|
||||||
echo " README.md"
|
echo " README.md"
|
||||||
echo ""
|
echo ""
|
||||||
echo " → Copilot Chat: Frage den Agent die relevante Doku zu aktualisieren"
|
echo " → Copilot Chat: Frage den Agent die relevante Doku zu aktualisieren"
|
||||||
echo " → Bypass: git commit --no-verify"
|
|
||||||
ERRORS=$((ERRORS + 1))
|
ERRORS=$((ERRORS + 1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -78,7 +80,6 @@ if [ -n "$DOCS_DIR_STAGED" ] && [ -d "docs" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo " Alle 3 Zielgruppen-Dokumente müssen existieren."
|
echo " Alle 3 Zielgruppen-Dokumente müssen existieren."
|
||||||
echo " Templates: docs/USER.md, docs/ADMIN.md, docs/MAINTAINER.md"
|
echo " Templates: docs/USER.md, docs/ADMIN.md, docs/MAINTAINER.md"
|
||||||
echo " Bypass: git commit --no-verify"
|
|
||||||
ERRORS=$((ERRORS + 1))
|
ERRORS=$((ERRORS + 1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -93,7 +94,6 @@ if [ -f "history/summary/PROJECT_CONTEXT.md" ]; then
|
||||||
echo " history/summary/PROJECT_CONTEXT.md"
|
echo " history/summary/PROJECT_CONTEXT.md"
|
||||||
echo ""
|
echo ""
|
||||||
echo " → Copilot Chat: /history (loggt Session + aktualisiert Kontext)"
|
echo " → Copilot Chat: /history (loggt Session + aktualisiert Kontext)"
|
||||||
echo " → Bypass: git commit --no-verify"
|
|
||||||
ERRORS=$((ERRORS + 1))
|
ERRORS=$((ERRORS + 1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -103,8 +103,8 @@ if [ "$ERRORS" -gt 0 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "══════════════════════════════════════════════════════════"
|
echo "══════════════════════════════════════════════════════════"
|
||||||
echo " $ERRORS von 4 Quality Gate(s) nicht bestanden."
|
echo " $ERRORS von 4 Quality Gate(s) nicht bestanden."
|
||||||
echo " Behebe die Probleme ODER: git commit --no-verify"
|
echo " Behebe die Probleme bevor du committst."
|
||||||
echo "══════════════════════════════════════════════════════════"
|
echo " ══════════════════════════════════════════════════════════"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -147,3 +147,30 @@ post-commit Hook hängt Git-Block an.
|
||||||
- `~/.copilot-setup/` wird beim ersten `git copilot-update` angelegt — SSH-Key
|
- `~/.copilot-setup/` wird beim ersten `git copilot-update` angelegt — SSH-Key
|
||||||
muss für den Gitea-Server konfiguriert sein (oder HTTP-Fallback greift)
|
muss für den Gitea-Server konfiguriert sein (oder HTTP-Fallback greift)
|
||||||
- `COPILOT_SETUP_DIR` ENV-Variable dokumentieren (in README oder ADMIN.md)
|
- `COPILOT_SETUP_DIR` ENV-Variable dokumentieren (in README oder ADMIN.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Git Commit
|
||||||
|
|
||||||
|
| Feld | Wert |
|
||||||
|
|---|---|
|
||||||
|
| Datum | 2026-06-02 10:43:42 |
|
||||||
|
| Branch | `master` |
|
||||||
|
| Commit | `3b34074556a616b0ad44554906244eee9fa64147` |
|
||||||
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
||||||
|
|
||||||
|
### Commit Message
|
||||||
|
|
||||||
|
```
|
||||||
|
docs: agent session history 2026-06-02 copilot-update-auto-deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
### Geänderte Dateien
|
||||||
|
|
||||||
|
| Status | Datei |
|
||||||
|
|---|---|
|
||||||
|
| A | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md |
|
||||||
|
| A | history/prompts/2026-06-02_master_55fee83.md |
|
||||||
|
|
||||||
|
---
|
||||||
|
*Git-Block automatisch generiert durch post-commit hook.*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue