From 95d03603cf0892e890024385d3cd2a031ccaaece Mon Sep 17 00:00:00 2001 From: Conrad Schulz Date: Sun, 31 May 2026 12:51:15 +0000 Subject: [PATCH] fix: history/prompts/ is committed, not gitignored Full agent conversation history is preserved in git. Only data/ remains gitignored (persistent service data). --- README.md | 2 +- docs/ADMIN.md | 4 ++-- docs/MAINTAINER.md | 2 +- docs/USER.md | 2 +- git-templates/.github/copilot-instructions.md | 4 ++-- git-templates/docs/MAINTAINER.md | 2 +- git-templates/history/summary/PROJECT_CONTEXT.md | 2 +- prompts/history.prompt.md | 4 ++-- scripts/copilot-bootstrap.sh | 15 ++++++--------- 9 files changed, 17 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0677cff..d27725e 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Nach `git init` (via Alias) oder `copilot-bootstrap.sh`: | VS Code-Einstellungen | `.vscode/` | | **pre-commit Quality Gate** | `.git/hooks/pre-commit` | | **Persistente Daten (gitignored)** | `data/` | -| **Agent-Konversationen (gitignored)** | `history/prompts/` | +| **Agent-Konversationen (committed)** | `history/prompts/` | | **Agent-Kontext-Summary (committed)** | `history/summary/PROJECT_CONTEXT.md` | | **Endnutzer-Dokumentation** | `docs/USER.md` | | **Administrator-Dokumentation** | `docs/ADMIN.md` | diff --git a/docs/ADMIN.md b/docs/ADMIN.md index bc4ca02..8449d31 100644 --- a/docs/ADMIN.md +++ b/docs/ADMIN.md @@ -98,10 +98,10 @@ Das Bootstrap-Skript legt idempotent an: - `.github/copilot-instructions.md` - `.vscode/settings.json` + `.vscode/extensions.json` - `data/` (gitignored) -- `history/prompts/` (gitignored) + `history/summary/PROJECT_CONTEXT.md` +- `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/**/*` und `history/prompts/*` +- `.gitignore`-Einträge für `data/**/*` --- diff --git a/docs/MAINTAINER.md b/docs/MAINTAINER.md index 6f4adc6..db82c69 100644 --- a/docs/MAINTAINER.md +++ b/docs/MAINTAINER.md @@ -120,5 +120,5 @@ Dateien unter `git-templates/` bearbeiten → `deploy.sh` ausführen → neue Re | Templates nicht auto-updaten | Idempotenz: Bootstrap überschreibt nie – Nutzer können Templates nach Init anpassen | | 3 Zielgruppen-Docs (USER/ADMIN/MAINTAINER) | Klare Trennung: Nutzer ≠ Ops ≠ Dev; jede Gruppe findet ihren Kontext direkt | | `data/` gitignored, Ordner-Struktur tracked | Persistente Daten gehören nie ins Git; Struktur als Konvention dokumentiert | -| `history/prompts/` gitignored | Agent-Logs können groß und vertraulich sein; nur der komprimierte Kontext (summary) wird committed | +| `history/prompts/` committed | Vollständige Agent-History bleibt im Repo erhalten; ermöglicht lückenlose Nachvollziehbarkeit | | pre-commit Hook als Quality Gate | Automatisches Netz verhindert dass Tests/Doku vergessen werden; `--no-verify` bleibt als bewusstes Escape-Valve | diff --git a/docs/USER.md b/docs/USER.md index 8a68af8..7b5aaed 100644 --- a/docs/USER.md +++ b/docs/USER.md @@ -91,7 +91,7 @@ Nach `git init` oder `copilot-bootstrap.sh` erhält jedes Repo automatisch: | VS Code-Einstellungen | `.vscode/settings.json` | Repo-spezifische Editor-Konfiguration | | Empfohlene Extensions | `.vscode/extensions.json` | Extension-Vorschläge für das Team | | Persistente Daten | `data/` | Service-Daten getrennt nach Service-Namen | -| Agent-Logs | `history/prompts/` | Vollständige Konversationen (gitignored) | +| Agent-Logs | `history/prompts/` | Vollständige Konversationen (committed) | | Agent-Kontext | `history/summary/PROJECT_CONTEXT.md` | Komprimierter Projektzustand für Agenten | | Nutzer-Doku | `docs/USER.md` | Dokumentation für Endnutzer | | Admin-Doku | `docs/ADMIN.md` | Dokumentation für Administratoren | diff --git a/git-templates/.github/copilot-instructions.md b/git-templates/.github/copilot-instructions.md index 5b97c6d..b16864a 100644 --- a/git-templates/.github/copilot-instructions.md +++ b/git-templates/.github/copilot-instructions.md @@ -25,10 +25,10 @@ - Erforderliche Unterordner in `docs/ADMIN.md` dokumentieren ### Agent History (`/history/`) -- **Vollständige Konversationen** → `history/prompts/YYYY-MM-DD_beschreibung.md` (gitignored) +- **Vollständige Konversationen** → `history/prompts/YYYY-MM-DD_beschreibung.md` (**committed – vollständige History bleibt erhalten**) - **Komprimierter Kontext** → `history/summary/PROJECT_CONTEXT.md` (**committed, immer aktuell halten!**) - **Beim Start einer neuen Session:** `history/summary/PROJECT_CONTEXT.md` zuerst lesen -- **Am Ende jeder Session:** `PROJECT_CONTEXT.md` aktualisieren und committen +- **Am Ende jeder Session:** beide Dateien committen - Copilot Chat: `/history` → History loggen + Summary aktualisieren ### Documentation (3 Zielgruppen – alle 3 müssen existieren) diff --git a/git-templates/docs/MAINTAINER.md b/git-templates/docs/MAINTAINER.md index cc49fd3..ad8ea35 100644 --- a/git-templates/docs/MAINTAINER.md +++ b/git-templates/docs/MAINTAINER.md @@ -81,7 +81,7 @@ ADR-Dateien liegen unter `docs/adr/`. Format: `NNN-titel.md`. Der Agent liest beim Start immer `history/summary/PROJECT_CONTEXT.md`. Nach Abschluss einer Aufgabe wird dort der Projektzustand aktualisiert. -- Vollständige Konversationen: `history/prompts/` (gitignored, lokal) +- Vollständige Konversationen: `history/prompts/` (committed – History bleibt vollständig erhalten) - Komprimierter Kontext: `history/summary/PROJECT_CONTEXT.md` (committed) --- diff --git a/git-templates/history/summary/PROJECT_CONTEXT.md b/git-templates/history/summary/PROJECT_CONTEXT.md index 332c69b..4f4ae69 100644 --- a/git-templates/history/summary/PROJECT_CONTEXT.md +++ b/git-templates/history/summary/PROJECT_CONTEXT.md @@ -54,7 +54,7 @@ ## Wichtige Pfade & Konventionen - **Persistente Daten:** `/data//` (gitignored, nie committen!) -- **Agent-Logs (voll):** `/history/prompts/` (gitignored, lokal) +- **Agent-Logs (voll):** `/history/prompts/` (committed – vollständige History im Repo) - **Dieser Kontext:** `/history/summary/PROJECT_CONTEXT.md` (committed) - **Tests:** `tests/` (Struktur spiegelt Source) - **Docs:** `docs/USER.md` | `docs/ADMIN.md` | `docs/MAINTAINER.md` diff --git a/prompts/history.prompt.md b/prompts/history.prompt.md index 2c92b99..d76c1e7 100644 --- a/prompts/history.prompt.md +++ b/prompts/history.prompt.md @@ -64,6 +64,6 @@ lesen muss um sofort produktiv zu sein. Nach Abschluss dieser Aufgabe: ```bash -git add history/summary/PROJECT_CONTEXT.md -# history/prompts/ ist gitignored – kein add nötig +git add history/ +git commit -m "docs: update agent history and project context" ``` diff --git a/scripts/copilot-bootstrap.sh b/scripts/copilot-bootstrap.sh index 9109c2f..dfcef47 100644 --- a/scripts/copilot-bootstrap.sh +++ b/scripts/copilot-bootstrap.sh @@ -56,8 +56,7 @@ fi # ── history/ – Agent-History und Kontext-Summary ───────────────────────────── if [ ! -d "$TARGET/history/prompts" ]; then mkdir -p "$TARGET/history/prompts" - touch "$TARGET/history/prompts/.gitkeep" - echo " ✓ history/prompts/ created (Agent-Logs – gitignored)" + echo " ✓ history/prompts/ created (Agent-Logs – committed)" fi if [ ! -f "$TARGET/history/summary/PROJECT_CONTEXT.md" ]; then mkdir -p "$TARGET/history/summary" @@ -95,7 +94,7 @@ else echo " ─ .git/hooks/pre-commit already exists, skipping" fi -# ── .gitignore – data/ und history/prompts/ ausschließen ───────────────────── +# ── .gitignore – data/ ausschließen ───────────────────────────────────────── GITIGNORE="$TARGET/.gitignore" GITIGNORE_UPDATED=0 @@ -106,13 +105,11 @@ _append_gitignore() { fi } -_append_gitignore "data/**/*" "# Persistente Service-Daten (nie committen!)" -_append_gitignore "!data/.gitkeep" "" -_append_gitignore "history/prompts/*" "# Agent-Konversations-Logs (zu groß / zu roh für Git)" -_append_gitignore "!history/prompts/.gitkeep" "" +_append_gitignore "data/**/*" "# Persistente Service-Daten (nie committen!)" +_append_gitignore "!data/.gitkeep" "" if [ "$GITIGNORE_UPDATED" -eq 1 ]; then - echo " ✓ .gitignore aktualisiert (data/, history/prompts/ excluded)" + echo " ✓ .gitignore aktualisiert (data/ excluded)" else echo " ─ .gitignore already has required entries, skipping" fi @@ -123,5 +120,5 @@ echo " 1. TODO-Felder ausfüllen:" echo " - .github/copilot-instructions.md" echo " - history/summary/PROJECT_CONTEXT.md" echo " - docs/USER.md, docs/ADMIN.md, docs/MAINTAINER.md" -echo " 2. git add .github .vscode docs history/summary .gitignore" +echo " 2. git add .github .vscode docs history .gitignore" echo " git commit -m 'chore: add copilot workspace config'"