2026-06-02 10:43:42 +00:00
|
|
|
|
# copilot-update.sh + Auto-Deploy via Git Hooks – 2026-06-02
|
|
|
|
|
|
|
|
|
|
|
|
## Aufgabe / Ziel
|
|
|
|
|
|
|
|
|
|
|
|
Einen automatisierten Weg schaffen, um die AI Prompting Rules aus dem Setup-Repo
|
|
|
|
|
|
`http://192.168.178.6:8083/cschulz/rd13_copilot_setup` in neue und bestehende Repos
|
|
|
|
|
|
zu übernehmen und aktuell zu halten — über Git Hooks und Scripts.
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Verlauf
|
|
|
|
|
|
|
|
|
|
|
|
### Prompt 1
|
|
|
|
|
|
Ich möchte jetzt noch einen weg für neue repos um das einführen und vorallem das
|
|
|
|
|
|
updaten neuerungen der ai promting rules aus dem repo noch einfacher und schneller
|
|
|
|
|
|
zu machen. Was können wir noch mit git templates und scripten machen um das
|
|
|
|
|
|
eventuell über git hooks zu automatisieren. gehen wir davon aus das das rebo immer
|
|
|
|
|
|
hier zur verfügung steht http://192.168.178.6:8083/cschulz/rd13_copilot_setup
|
|
|
|
|
|
|
|
|
|
|
|
### Antwort 1
|
|
|
|
|
|
Analyse des bestehenden Systems (deploy.sh, copilot-bootstrap.sh, pre-commit,
|
|
|
|
|
|
post-commit Hooks). Drei Klärungsfragen gestellt:
|
|
|
|
|
|
- AutoUpdate-Trigger: manuell via `git copilot-update` ✓
|
|
|
|
|
|
- Update-Scope: Git-Hooks immer + copilot-instructions.md nur bei TODO ✓
|
|
|
|
|
|
- URL: SSH mit HTTP-Fallback ✓
|
|
|
|
|
|
|
|
|
|
|
|
Plan ausgearbeitet:
|
|
|
|
|
|
- `copilot-update.sh`: cached Setup-Repo in `~/.copilot-setup/`, aktualisiert
|
|
|
|
|
|
Templates + Prompts + repo-lokale Hooks
|
|
|
|
|
|
- `git copilot-update` Alias
|
|
|
|
|
|
- `post-merge` Hook für Setup-Repo selbst (auto-deploy nach git pull)
|
|
|
|
|
|
- `--with-update-hook` Flag für copilot-bootstrap.sh (opt-in)
|
|
|
|
|
|
|
|
|
|
|
|
### Prompt 2
|
|
|
|
|
|
Start implementation
|
|
|
|
|
|
|
|
|
|
|
|
### Antwort 2
|
|
|
|
|
|
Implementierung aller geplanten Dateien:
|
|
|
|
|
|
|
|
|
|
|
|
**Neu erstellt:**
|
|
|
|
|
|
- `scripts/copilot-update.sh` – POSIX sh, SSH+HTTP-Fallback, Clone/Pull in
|
|
|
|
|
|
`~/.copilot-setup/`, globale Templates, VS Code Prompts, repo-lokale Hooks,
|
|
|
|
|
|
copilot-instructions.md nur bei TODO-Erkennung (Backup .bak)
|
|
|
|
|
|
- `scripts/copilot-update.fish` – Fish-Variante
|
|
|
|
|
|
- `git-templates/hooks/post-merge` – opt-in Hook: ruft copilot-update.sh auf
|
|
|
|
|
|
|
|
|
|
|
|
**Geändert:**
|
|
|
|
|
|
- `scripts/deploy.sh` – copilot-update.sh/.fish installieren, `git copilot-update`
|
|
|
|
|
|
Alias setzen, post-merge Hook im Setup-Repo selbst installieren
|
|
|
|
|
|
- `scripts/deploy.fish` – analog
|
|
|
|
|
|
- `scripts/copilot-bootstrap.sh` – `--with-update-hook` Flag, post-commit Hook
|
|
|
|
|
|
Installation ergänzt
|
|
|
|
|
|
|
|
|
|
|
|
Test erfolgreich:
|
|
|
|
|
|
```
|
|
|
|
|
|
=== Copilot Update ===
|
|
|
|
|
|
→ Klone Setup-Repo (SSH)...
|
|
|
|
|
|
✓ Geklont via SSH
|
|
|
|
|
|
✓ ~/.git-templates/ aktualisiert
|
|
|
|
|
|
✓ 10 Prompt-Dateien aktualisiert
|
|
|
|
|
|
Git-Repo erkannt: /tmp/test-repo
|
|
|
|
|
|
✓ .git/hooks/pre-commit aktualisiert
|
|
|
|
|
|
✓ .git/hooks/post-commit aktualisiert
|
|
|
|
|
|
─ .github/copilot-instructions.md nicht vorhanden, übersprungen
|
|
|
|
|
|
=== Done ===
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Commit: `feat: copilot-update.sh + git copilot-update alias + post-merge auto-deploy`
|
|
|
|
|
|
|
|
|
|
|
|
### Prompt 3
|
|
|
|
|
|
warum klappt das Project_Context updaten aber nicht das history promts schreiben?
|
|
|
|
|
|
|
|
|
|
|
|
### Antwort 3
|
|
|
|
|
|
Root Cause identifiziert:
|
|
|
|
|
|
1. VS Code Copilot System-Instruction: "Do NOT create markdown files unless
|
|
|
|
|
|
requested" — blockiert automatisches Anlegen neuer .md Dateien.
|
|
|
|
|
|
`PROJECT_CONTEXT.md` klappt weil die Datei bereits existiert (replace ≠ create).
|
|
|
|
|
|
2. Namensformat-Inkonsistenz: copilot-instructions.md sagte `YYYY-MM-DD_kurztitel.md`,
|
|
|
|
|
|
post-commit Hook erwartet zwingend `_session.md` Suffix.
|
|
|
|
|
|
|
|
|
|
|
|
Fix: Beide `copilot-instructions.md` (repo + git-template) korrigiert:
|
|
|
|
|
|
- `_session.md` Suffix als Pflichtformat dokumentiert
|
|
|
|
|
|
- "auch ohne explizite Aufforderung" entfernt → History nur via `/history`
|
|
|
|
|
|
- Hinweis auf System-Instruction-Konflikt ergänzt
|
|
|
|
|
|
|
|
|
|
|
|
Commit: `fix: copilot-instructions.md Session-END Protokoll korrigiert`
|
|
|
|
|
|
|
|
|
|
|
|
### Prompt 4
|
|
|
|
|
|
ok aber warum ist dann jetzt aktuell immer noch keine .md von heute in History?
|
|
|
|
|
|
|
|
|
|
|
|
### Antwort 4
|
|
|
|
|
|
Weiterer Bug gefunden: `.git/hooks/` des Setup-Repos selbst enthielt nur
|
|
|
|
|
|
`pre-commit` und `post-merge` — **kein `post-commit` Hook**.
|
|
|
|
|
|
`deploy.sh` installierte zwar den post-merge Hook, vergaß aber post-commit.
|
|
|
|
|
|
Für andere Repos macht das `copilot-bootstrap.sh`, aber das Setup-Repo selbst
|
|
|
|
|
|
fiel durchs Raster.
|
|
|
|
|
|
|
|
|
|
|
|
Fix:
|
|
|
|
|
|
- post-commit Hook sofort manuell installiert: `cp git-templates/hooks/post-commit .git/hooks/`
|
|
|
|
|
|
- `scripts/deploy.sh` und `deploy.fish` gepatcht: Block 7 installiert jetzt
|
|
|
|
|
|
sowohl post-merge als auch post-commit im Setup-Repo
|
|
|
|
|
|
- Verifikation: nächster Commit löste post-commit aus:
|
|
|
|
|
|
`✓ history: 2026-06-02_master_55fee83.md geschrieben (nur Git-Metadaten)`
|
|
|
|
|
|
|
|
|
|
|
|
Commit: `fix: post-commit Hook im Setup-Repo selbst installieren via deploy.sh`
|
|
|
|
|
|
|
|
|
|
|
|
### Prompt 5
|
|
|
|
|
|
also dann noch ein test.
|
|
|
|
|
|
|
|
|
|
|
|
### Antwort 5
|
|
|
|
|
|
Session-Datei wird jetzt explizit auf Anfrage erstellt (dies hier).
|
|
|
|
|
|
Test des vollständigen Flows: Session-Datei `_session.md` anlegen → committen →
|
|
|
|
|
|
post-commit Hook hängt Git-Block an.
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Ergebnis
|
|
|
|
|
|
|
|
|
|
|
|
| Datei | Status | Beschreibung |
|
|
|
|
|
|
|---|---|---|
|
|
|
|
|
|
| `scripts/copilot-update.sh` | ✓ neu | Haupt-Updater (POSIX sh) |
|
|
|
|
|
|
| `scripts/copilot-update.fish` | ✓ neu | Fish-Variante |
|
|
|
|
|
|
| `git-templates/hooks/post-merge` | ✓ neu | Opt-in Template-Hook |
|
|
|
|
|
|
| `scripts/deploy.sh` | ✓ geändert | Update-Script + Aliase + beide Hooks |
|
|
|
|
|
|
| `scripts/deploy.fish` | ✓ geändert | analog |
|
|
|
|
|
|
| `scripts/copilot-bootstrap.sh` | ✓ geändert | `--with-update-hook` + post-commit |
|
|
|
|
|
|
| `.github/copilot-instructions.md` | ✓ geändert | `_session.md` Suffix-Pflicht + /history Hinweis |
|
|
|
|
|
|
| `git-templates/.github/copilot-instructions.md` | ✓ geändert | analog |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Entscheidungen
|
|
|
|
|
|
|
|
|
|
|
|
| Entscheidung | Begründung |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| `git copilot-update` manuell (kein Auto-Hook) | Kein Overhead bei jedem git pull in anderen Repos |
|
|
|
|
|
|
| SSH+HTTP-Fallback | Funktioniert ohne SSH-Key auf neuen Maschinen |
|
|
|
|
|
|
| copilot-instructions.md nur bei TODO überschreiben | User-Content bleibt erhalten; .bak Backup |
|
|
|
|
|
|
| `--with-update-hook` als opt-in Flag | Nutzer entscheiden selbst ob auto-update nach pull |
|
|
|
|
|
|
| post-commit Hook auch im Setup-Repo | Setup-Repo soll selbst History schreiben |
|
|
|
|
|
|
| History-Datei nur via `/history` (explizit) | VS Code System-Instruction blockiert sonst Create |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Offene Punkte
|
|
|
|
|
|
|
|
|
|
|
|
- `~/.copilot-setup/` wird beim ersten `git copilot-update` angelegt — SSH-Key
|
|
|
|
|
|
muss für den Gitea-Server konfiguriert sein (oder HTTP-Fallback greift)
|
|
|
|
|
|
- `COPILOT_SETUP_DIR` ENV-Variable dokumentieren (in README oder ADMIN.md)
|
2026-06-02 10:54:08 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## 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.*
|
2026-06-02 11:13:34 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Git Commit
|
|
|
|
|
|
|
|
|
|
|
|
| Feld | Wert |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| Datum | 2026-06-02 10:54:08 |
|
|
|
|
|
|
| Branch | `master` |
|
|
|
|
|
|
| Commit | `eb19cf7e996c9ef1d25b6bc4b31e832493886074` |
|
|
|
|
|
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
|
|
|
|
|
|
|
|
|
|
|
### Commit Message
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
fix: --no-verify komplett entfernt aus pre-commit + .copilot-no-tests
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Geänderte Dateien
|
|
|
|
|
|
|
|
|
|
|
|
| Status | Datei |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| A | .copilot-no-tests |
|
|
|
|
|
|
| M | .github/copilot-instructions.md |
|
|
|
|
|
|
| M | README.md |
|
|
|
|
|
|
| M | git-templates/.github/copilot-instructions.md |
|
|
|
|
|
|
| M | git-templates/hooks/pre-commit |
|
|
|
|
|
|
| M | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
*Git-Block automatisch generiert durch post-commit hook.*
|
2026-06-02 17:38:34 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Git Commit
|
|
|
|
|
|
|
|
|
|
|
|
| Feld | Wert |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| Datum | 2026-06-02 11:13:34 |
|
|
|
|
|
|
| Branch | `master` |
|
|
|
|
|
|
| Commit | `fb1a01ba78da267bebbf6d52f98304b64f58b156` |
|
|
|
|
|
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
|
|
|
|
|
|
|
|
|
|
|
### Commit Message
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
fix: review-findings behoben (7 Punkte)
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Geänderte Dateien
|
|
|
|
|
|
|
|
|
|
|
|
| Status | Datei |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| A | .copilot-no-docs |
|
|
|
|
|
|
| M | .github/copilot-instructions.md |
|
|
|
|
|
|
| M | git-templates/.github/copilot-instructions.md |
|
|
|
|
|
|
| M | git-templates/hooks/pre-commit |
|
|
|
|
|
|
| M | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md |
|
|
|
|
|
|
| D | history/prompts/2026-06-02_master_55fee83.md |
|
|
|
|
|
|
| M | history/summary/PROJECT_CONTEXT.md |
|
|
|
|
|
|
| M | prompts/history.prompt.md |
|
|
|
|
|
|
| M | scripts/copilot-bootstrap.sh |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
*Git-Block automatisch generiert durch post-commit hook.*
|
2026-06-02 17:51:41 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Git Commit
|
|
|
|
|
|
|
|
|
|
|
|
| Feld | Wert |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| Datum | 2026-06-02 17:38:35 |
|
|
|
|
|
|
| Branch | `master` |
|
|
|
|
|
|
| Commit | `d31db9086fbee964b17d5ceb32ba545fbd15f35a` |
|
|
|
|
|
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
|
|
|
|
|
|
|
|
|
|
|
### Commit Message
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
fix: alle --no-verify Referenzen entfernt + pre-commit Nummerierung
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Geänderte Dateien
|
|
|
|
|
|
|
|
|
|
|
|
| Status | Datei |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| M | .github/copilot-instructions.md |
|
|
|
|
|
|
| M | docs/ADMIN.md |
|
|
|
|
|
|
| M | docs/MAINTAINER.md |
|
|
|
|
|
|
| M | docs/USER.md |
|
|
|
|
|
|
| M | git-templates/.github/copilot-instructions.md |
|
|
|
|
|
|
| M | git-templates/hooks/pre-commit |
|
|
|
|
|
|
| M | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md |
|
|
|
|
|
|
| M | history/summary/PROJECT_CONTEXT.md |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
*Git-Block automatisch generiert durch post-commit hook.*
|
2026-06-02 17:58:25 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## Git Commit
|
|
|
|
|
|
|
|
|
|
|
|
| Feld | Wert |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| Datum | 2026-06-02 17:51:41 |
|
|
|
|
|
|
| Branch | `master` |
|
|
|
|
|
|
| Commit | `a959d768505ba3ac807fcf2031f8a615a0351e0b` |
|
|
|
|
|
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
|
|
|
|
|
|
|
|
|
|
|
### Commit Message
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
feat: requirements engineering + konsistenz-check
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Geänderte Dateien
|
|
|
|
|
|
|
|
|
|
|
|
| Status | Datei |
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
| M | .github/copilot-instructions.md |
|
|
|
|
|
|
| M | git-templates/.github/copilot-instructions.md |
|
|
|
|
|
|
| A | git-templates/docs/requirements/REQUIREMENTS.md |
|
|
|
|
|
|
| M | git-templates/history/summary/PROJECT_CONTEXT.md |
|
|
|
|
|
|
| M | git-templates/hooks/pre-commit |
|
|
|
|
|
|
| M | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md |
|
|
|
|
|
|
| M | history/summary/PROJECT_CONTEXT.md |
|
|
|
|
|
|
| A | prompts/check-consistency.prompt.md |
|
|
|
|
|
|
| M | prompts/requirements.prompt.md |
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
*Git-Block automatisch generiert durch post-commit hook.*
|