docs: agent session history 2026-06-02 copilot-update-auto-deploy
This commit is contained in:
parent
55fee83bbd
commit
3b34074556
2 changed files with 179 additions and 0 deletions
149
history/prompts/2026-06-02_copilot-update-auto-deploy_session.md
Normal file
149
history/prompts/2026-06-02_copilot-update-auto-deploy_session.md
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
# 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)
|
||||||
30
history/prompts/2026-06-02_master_55fee83.md
Normal file
30
history/prompts/2026-06-02_master_55fee83.md
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Auto-Log: fix: post-commit Hook im Setup-Repo selbst installieren via deploy.sh
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Git Commit
|
||||||
|
|
||||||
|
| Feld | Wert |
|
||||||
|
|---|---|
|
||||||
|
| Datum | 2026-06-02 10:41:28 |
|
||||||
|
| Branch | `master` |
|
||||||
|
| Commit | `55fee83bbd686b7a3889f86c753d05a7f733e5db` |
|
||||||
|
| Autor | Conrad Schulz <conradschulz@me.com> |
|
||||||
|
|
||||||
|
### Commit Message
|
||||||
|
|
||||||
|
```
|
||||||
|
fix: post-commit Hook im Setup-Repo selbst installieren via deploy.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Geänderte Dateien
|
||||||
|
|
||||||
|
| Status | Datei |
|
||||||
|
|---|---|
|
||||||
|
| M | scripts/deploy.fish |
|
||||||
|
| M | scripts/deploy.sh |
|
||||||
|
|
||||||
|
---
|
||||||
|
*Git-Block automatisch generiert durch post-commit hook.*
|
||||||
|
|
||||||
|
*Kein Agent-Log vorhanden. Für vollständige Konversation: Copilot Chat → `/history` vor dem Commit ausführen.*
|
||||||
Loading…
Add table
Reference in a new issue