From 6ab2614df5d89c645889acd8a7b2a659a64ca278 Mon Sep 17 00:00:00 2001 From: Conrad Schulz Date: Tue, 2 Jun 2026 18:02:52 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20pre-commit=20Check=206=20=E2=80=93=20Se?= =?UTF-8?q?ssion-Datei=20fuer=20heute=20erforderlich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Blockiert Commit wenn keine history/prompts/HEUTE_*_session.md existiert - Zwingt Agenten /history auszufuehren vor dem Commit - Opt-out: .copilot-no-session fuer manuelle Commits ohne Chat-Kontext - .gitignore: *.bak ergaenzt (copilot-update.sh legt .bak bei copilot-instructions.md an) --- .gitignore | 1 + git-templates/hooks/pre-commit | 22 ++++++++++++++- ...-fixes-requirements-engineering_session.md | 28 +++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9735516..febdeef 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ data/**/* !data/.gitkeep +*.bak diff --git a/git-templates/hooks/pre-commit b/git-templates/hooks/pre-commit index c71c458..f6f9b75 100755 --- a/git-templates/hooks/pre-commit +++ b/git-templates/hooks/pre-commit @@ -7,6 +7,7 @@ # 3. Alle 3 Dokumentations-Zielgruppen vorhanden sind (USER/ADMIN/MAINTAINER) # 4. history/summary/PROJECT_CONTEXT.md aktualisiert wurde # 5. docs/requirements/REQUIREMENTS.md keine unstaged Änderungen hat +# 6. Eine Session-Datei für heute existiert (history/prompts/HEUTE_*_session.md) # # Hooks laufen immer – kein --no-verify verwenden. @@ -118,11 +119,30 @@ if [ -f "docs/requirements/REQUIREMENTS.md" ] && [ ! -f ".copilot-no-requirement fi fi +# ── Check 6: Session-Datei für heute ────────────────────────────────────────────────── +# Prüft ob eine Agent-Session-Datei für heute existiert. +# Zwingt den Agenten /history auszuführen bevor er committet. +# Opt-out: Datei '.copilot-no-session' im Repo-Root für manuelle Commits ohne Chat-Kontext. +if [ -d "history/prompts" ] && [ ! -f ".copilot-no-session" ]; then + TODAY=$(date +%Y-%m-%d) + SESSION_FILE=$(ls "history/prompts/${TODAY}_"*"_session.md" 2>/dev/null | head -1) + if [ -z "$SESSION_FILE" ]; then + echo "" + echo "✗ AGENT QUALITY GATE [6/6]: Keine Session-Datei für heute" + echo " Es existiert kein Agent-Log für heute (${TODAY}_*_session.md)." + echo "" + echo " → Copilot Chat: /history (Session loggen + Kontext aktualisieren)" + echo " → Manueller Commit ohne Chat? Datei '.copilot-no-session' anlegen:" + echo " touch .copilot-no-session && git add .copilot-no-session" + ERRORS=$((ERRORS + 1)) + fi +fi + # ── Ergebnis ────────────────────────────────────────────────────────────────── if [ "$ERRORS" -gt 0 ]; then echo "" echo "══════════════════════════════════════════════════════════" - echo " $ERRORS von 5 Quality Gate(s) nicht bestanden." + echo " $ERRORS von 6 Quality Gate(s) nicht bestanden." echo " Behebe die Probleme bevor du committst." echo " ══════════════════════════════════════════════════════════" echo "" diff --git a/history/prompts/2026-06-02_review-fixes-requirements-engineering_session.md b/history/prompts/2026-06-02_review-fixes-requirements-engineering_session.md index fa7aa43..043dc67 100644 --- a/history/prompts/2026-06-02_review-fixes-requirements-engineering_session.md +++ b/history/prompts/2026-06-02_review-fixes-requirements-engineering_session.md @@ -174,3 +174,31 @@ Erklärt: `/history` in VS Code Copilot Chat eintippen. - [ ] `docs/requirements/REQUIREMENTS.md` für dieses Setup-Repo selbst anlegen (aktuell nur Template im git-templates) - [ ] `.github/copilot-instructions.md` TODO-Felder ausfüllen (Stack, Architecture, NFRs) + +--- + +## Git Commit + +| Feld | Wert | +|---|---| +| Datum | 2026-06-02 17:58:25 | +| Branch | `master` | +| Commit | `8ec4038dc591821b3d821db2e67c0ae8fe925e28` | +| Autor | Conrad Schulz | + +### Commit Message + +``` +docs: session history 2026-06-02 review-fixes + requirements engineering +``` + +### Geänderte Dateien + +| Status | Datei | +|---|---| +| M | history/prompts/2026-06-02_copilot-update-auto-deploy_session.md | +| A | history/prompts/2026-06-02_review-fixes-requirements-engineering_session.md | +| M | history/summary/PROJECT_CONTEXT.md | + +--- +*Git-Block automatisch generiert durch post-commit hook.*