From 5a26d6a85e48c0ea5083a534935ef77fcee268eb Mon Sep 17 00:00:00 2001 From: Jens Reinemann Date: Mon, 18 May 2026 09:26:36 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20rename=20workflow-*.prompt.md=20?= =?UTF-8?q?=E2=86=92=20nextstep-*.prompt.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Namenskonvention für Genome Engine Verbund-Erkennung: Router .prompt.md + Sub-Prompts -*.prompt.md ermöglicht rein pfadbasierte Trait-Zuordnung ohne Content-Parsing. --- ...t.md => nextstep-block-planning.prompt.md} | 0 ...t.md => nextstep-implementation.prompt.md} | 0 ...t.md => nextstep-infrastructure.prompt.md} | 0 ....prompt.md => nextstep-planning.prompt.md} | 0 ...pt.md => nextstep-tech-decision.prompt.md} | 0 ...test.prompt.md => nextstep-test.prompt.md} | 0 .github/prompts/nextstep.prompt.md | 12 +- .github/skills/gh-tickets/SKILL.md | 16 +- docs/genome-engine.md | 199 ++++++++++++++++++ 9 files changed, 213 insertions(+), 14 deletions(-) rename .github/prompts/{workflow-block-planning.prompt.md => nextstep-block-planning.prompt.md} (100%) rename .github/prompts/{workflow-implementation.prompt.md => nextstep-implementation.prompt.md} (100%) rename .github/prompts/{workflow-infrastructure.prompt.md => nextstep-infrastructure.prompt.md} (100%) rename .github/prompts/{workflow-planning.prompt.md => nextstep-planning.prompt.md} (100%) rename .github/prompts/{workflow-tech-decision.prompt.md => nextstep-tech-decision.prompt.md} (100%) rename .github/prompts/{workflow-test.prompt.md => nextstep-test.prompt.md} (100%) create mode 100644 docs/genome-engine.md diff --git a/.github/prompts/workflow-block-planning.prompt.md b/.github/prompts/nextstep-block-planning.prompt.md similarity index 100% rename from .github/prompts/workflow-block-planning.prompt.md rename to .github/prompts/nextstep-block-planning.prompt.md diff --git a/.github/prompts/workflow-implementation.prompt.md b/.github/prompts/nextstep-implementation.prompt.md similarity index 100% rename from .github/prompts/workflow-implementation.prompt.md rename to .github/prompts/nextstep-implementation.prompt.md diff --git a/.github/prompts/workflow-infrastructure.prompt.md b/.github/prompts/nextstep-infrastructure.prompt.md similarity index 100% rename from .github/prompts/workflow-infrastructure.prompt.md rename to .github/prompts/nextstep-infrastructure.prompt.md diff --git a/.github/prompts/workflow-planning.prompt.md b/.github/prompts/nextstep-planning.prompt.md similarity index 100% rename from .github/prompts/workflow-planning.prompt.md rename to .github/prompts/nextstep-planning.prompt.md diff --git a/.github/prompts/workflow-tech-decision.prompt.md b/.github/prompts/nextstep-tech-decision.prompt.md similarity index 100% rename from .github/prompts/workflow-tech-decision.prompt.md rename to .github/prompts/nextstep-tech-decision.prompt.md diff --git a/.github/prompts/workflow-test.prompt.md b/.github/prompts/nextstep-test.prompt.md similarity index 100% rename from .github/prompts/workflow-test.prompt.md rename to .github/prompts/nextstep-test.prompt.md diff --git a/.github/prompts/nextstep.prompt.md b/.github/prompts/nextstep.prompt.md index 7c6b5f9..b76b380 100644 --- a/.github/prompts/nextstep.prompt.md +++ b/.github/prompts/nextstep.prompt.md @@ -56,12 +56,12 @@ Setze den Board-Status auf **"In Progress"**: | Typ | Workflow-Prompt | |---|---| -| [B] Grobplanung | `.github/prompts/workflow-block-planning.prompt.md` | -| [F] Feature | `.github/prompts/workflow-implementation.prompt.md` | -| [T] Tech-Entscheidung | `.github/prompts/workflow-tech-decision.prompt.md` | -| [I] Infrastruktur/Prozess | `.github/prompts/workflow-infrastructure.prompt.md` | -| [P] Planung | `.github/prompts/workflow-planning.prompt.md` | -| [X] Test | `.github/prompts/workflow-test.prompt.md` | +| [B] Grobplanung | `.github/prompts/nextstep-block-planning.prompt.md` | +| [F] Feature | `.github/prompts/nextstep-implementation.prompt.md` | +| [T] Tech-Entscheidung | `.github/prompts/nextstep-tech-decision.prompt.md` | +| [I] Infrastruktur/Prozess | `.github/prompts/nextstep-infrastructure.prompt.md` | +| [P] Planung | `.github/prompts/nextstep-planning.prompt.md` | +| [X] Test | `.github/prompts/nextstep-test.prompt.md` | Lies die Datei des passenden Workflows und führe ihn aus. Übergib dem Workflow: Titel und Issue-Nummer aus Schritt 1. diff --git a/.github/skills/gh-tickets/SKILL.md b/.github/skills/gh-tickets/SKILL.md index 3b33e1c..c7e52a7 100644 --- a/.github/skills/gh-tickets/SKILL.md +++ b/.github/skills/gh-tickets/SKILL.md @@ -38,14 +38,14 @@ Stoppe und fordere den User zur Zuordnung auf. Starte den Workflow **nicht** ohn | Label | Workflow-Prompt | | ---------------- | --------------------------------------------------- | -| `block-planning` | `.github/prompts/workflow-block-planning.prompt.md` | -| `feature` | `.github/prompts/workflow-implementation.prompt.md` | -| `migration` | `.github/prompts/workflow-implementation.prompt.md` | -| `refactoring` | `.github/prompts/workflow-implementation.prompt.md` | -| `tech-decision` | `.github/prompts/workflow-tech-decision.prompt.md` | -| `infrastructure` | `.github/prompts/workflow-infrastructure.prompt.md` | -| `planning` | `.github/prompts/workflow-planning.prompt.md` | -| `test` | `.github/prompts/workflow-test.prompt.md` | +| `block-planning` | `.github/prompts/nextstep-block-planning.prompt.md` | +| `feature` | `.github/prompts/nextstep-implementation.prompt.md` | +| `migration` | `.github/prompts/nextstep-implementation.prompt.md` | +| `refactoring` | `.github/prompts/nextstep-implementation.prompt.md` | +| `tech-decision` | `.github/prompts/nextstep-tech-decision.prompt.md` | +| `infrastructure` | `.github/prompts/nextstep-infrastructure.prompt.md` | +| `planning` | `.github/prompts/nextstep-planning.prompt.md` | +| `test` | `.github/prompts/nextstep-test.prompt.md` | --- diff --git a/docs/genome-engine.md b/docs/genome-engine.md new file mode 100644 index 0000000..1a67c94 --- /dev/null +++ b/docs/genome-engine.md @@ -0,0 +1,199 @@ +# Genome Engine – Konzept + +## Ziel + +Automatische Erkennung evolutionärer Verbesserungen an Copilot-Customization-Dateien (Skills, Agents, Prompts, Instructions) über Git-History hinweg. Die erkannten Verbesserungen werden destilliert, bewertet und als Propagation-Vorschläge für andere Projekte bereitgestellt. + +--- + +## Begriffe + +| Begriff | Bedeutung | +| ----------------- | ----------------------------------------------------------------------------------------- | +| **Trait** | Ein Skill, Agent, Prompt(-Verbund) oder Instructions-File inkl. aller zugehörigen Dateien | +| **Genome** | Die Gesamtheit aller Traits eines Projekts | +| **Mutation** | Ein Git-Commit-Delta an einem Trait (siehe Mutation-Typen) | +| **Growth Vector** | Destillierte, bewertete Mutation (bereinigt, klassifiziert, gescored) | +| **Propagation** | Konkreter Änderungsvorschlag für ein Ziel-Genome | + +--- + +## Scope + +Folgende Pfade bilden das Genome: + +- `.github/skills/**` +- `.github/agents/**` +- `.github/prompts/**` +- `.github/copilot-instructions.md` + +--- + +## Trait-Erkennung + +Traits werden aus dem Dateipfad abgeleitet. Die Granularität hängt vom Trait-Typ ab: + +### Skills + +Ein Skill besteht aus einem Ordner mit mehreren zusammengehörigen Dateien (SKILL.md, Scripte, Templates). Der **Ordnername** ist der Trait-Schlüssel. + +``` +.github/skills/gh-tickets/SKILL.md → trait: skill/gh-tickets +.github/skills/gh-tickets/queries.graphql → trait: skill/gh-tickets +.github/skills/android-build/SKILL.md → trait: skill/android-build +.github/skills/android-build/android-dev.ps1 → trait: skill/android-build +``` + +**Regel:** `skill/` – alle Dateien im Ordner gehören zum selben Trait. + +### Agents + +Ein Agent besteht aus genau einer Datei. Der **vollständige Dateiname** (ohne Pfad, ohne Extension) ist der Trait-Schlüssel. + +``` +.github/agents/android-implementer.agent.md → trait: agent/android-implementer +.github/agents/code-reviewer.agent.md → trait: agent/code-reviewer +``` + +**Regel:** `agent/` – 1:1-Zuordnung Datei → Trait. + +### Prompts + +Prompts unterscheiden zwei Varianten: **Standalone** und **Verbund**. + +#### Standalone-Prompts + +Einzeldateien ohne Router-Beziehung. Der **Dateiname** ist der Trait-Schlüssel. + +``` +.github/prompts/commit.prompt.md → trait: prompt/commit +.github/prompts/ship.prompt.md → trait: prompt/ship +.github/prompts/publish.prompt.md → trait: prompt/publish +.github/prompts/clean.prompt.md → trait: prompt/clean +``` + +**Regel:** `prompt/` – 1:1-Zuordnung Datei → Trait. + +#### Verbund-Prompts (Router + Sub-Workflows) + +Wenn eine Prompt-Datei eine Routing-Tabelle mit Verweisen auf andere `.prompt.md`-Dateien enthält, bilden Router + referenzierte Dateien **einen** Trait. Der **Router-Name** ist der Trait-Schlüssel. + +``` +.github/prompts/nextstep.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-implementation.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-infrastructure.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-planning.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-block-planning.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-tech-decision.prompt.md → trait: prompt/nextstep +.github/prompts/nextstep-test.prompt.md → trait: prompt/nextstep +``` + +**Regel:** `prompt/` – Router (`.prompt.md`) + alle `-*.prompt.md`-Dateien gehören zum selben Trait. + +**Begründung:** Der gesamte Workflow (Router + Sub-Prompts) ist semantisch eine Einheit (~300 Zeilen). Ein neuer Sub-Workflow ist nur im Kontext des Routers sinnvoll. Bei Propagation muss der Agent immer Router + Sub-Prompts zusammen betrachten. + +**Verbund-Erkennung (Namenskonvention):** Eine Datei `.prompt.md` ist ein Router, wenn Dateien `-*.prompt.md` im selben Verzeichnis existieren. Alle `-*.prompt.md`-Dateien gehören zum selben Verbund-Trait. + +### Instructions + +Instructions-Dateien sind Einzeldateien. Der **Dateiname** ist der Trait-Schlüssel. + +``` +.github/copilot-instructions.md → trait: instructions/copilot-instructions +``` + +**Regel:** `instructions/` – 1:1-Zuordnung Datei → Trait. + +--- + +## Mutation-Typen + +Jede Mutation wird mit einem Typ klassifiziert: + +| Typ | Bedeutung | Beispiel | +| ---------------- | ------------------------------------ | ------------------------------------------------------------ | +| `content-change` | Inhalt einer Datei im Trait geändert | `nextstep-implementation.prompt.md` optimiert | +| `member-added` | Neue Datei zum Trait hinzugefügt | Neuer `nextstep-migration.prompt.md` + Router-Eintrag | +| `member-removed` | Datei aus dem Trait entfernt | `nextstep-test.prompt.md` gelöscht + Router-Eintrag entfernt | + +Bei **Verbund-Traits** umfasst `member-added`/`member-removed` immer die betroffene Sub-Datei **und** die Router-Anpassung als zusammenhängende Mutation. Bei **Standalone-Traits** und **Skills** entspricht `member-added` dem Anlegen einer neuen Datei im Trait-Ordner. + +--- + +## Pipeline + +### Phase 1: Extraction (Script) + +**Input:** Repo-Pfad + Zeitspanne (z.B. `--since "4 days ago"`) +**Output:** `raw-mutations.md` + +- Scannt `git log` für Änderungen im Genome-Scope +- Gruppiert Diffs nach Trait (siehe Trait-Erkennung oben) +- Gibt pro Trait alle Commits mit Diff, Message und Autor aus + +**Tool:** `genome-extract.ps1` + +### Phase 2: Distillation (Agent) + +**Input:** `raw-mutations.md` +**Output:** `distilled-mutations.md` + +- Klassifiziert jede Mutation: + - 🔴 **Critical** – Bugfixes, die andere auch treffen + - 🟡 **Evolution** – Generelle Verbesserungen (bessere Prompts, neue Patterns) + - ⚪ **Specialized** – Projektspezifisch, nicht übertragbar +- Scored jede Mutation (1–10) +- Filtert sensitive Daten (Usernames, Maschinenpfade, Tokens, projektspezifische IDs) +- Specialized Mutations werden komplett entfernt + +**Tool:** `genome-distill.prompt.md` + +### Phase 3: Propagation (Agent) + +**Input:** `distilled-mutations.md` + Ziel-Genome (`.github/` des Ziel-Repos) +**Output:** `propagation-proposals.md` + +- Matched Traits zwischen Quell- und Ziel-Genome +- Erstellt konkrete Änderungsvorschläge pro Trait +- Formatiert als Checkliste: + - `[x]` Critical (default an) + - `[x]` Evolution mit Score ≥ 7 (default an) + - `[ ]` Evolution mit Score < 7 (default aus) + - Specialized taucht nicht auf (bereits gefiltert) +- User wählt aus, Agent wendet ausgewählte Patches an + +**Tool:** `genome-propagate.prompt.md` + +--- + +## Zeitbasierte Transferlogik + +Die Zeitspanne bestimmt, welche Mutations extrahiert werden: + +1. Letzter `.github/`-Commit im Ziel-Repo ermitteln → `T_target` +2. Alle `.github/`-Commits im Quell-Repo seit `T_target` extrahieren +3. Das Delta zwischen `T_target` und jetzt ist der Evolutionszeitraum + +**Beispiel:** bollwerk hat `.github/` zuletzt vor 4 Tagen von hva übernommen. Seitdem gab es 12 Commits an `.github/` in bollwerk. Diese 12 Commits sind die Mutations. + +--- + +## Deliverables + +| # | Datei | Typ | Ort | +| --- | ---------------------------- | ----------------- | ------------------------ | +| 1 | `genome-extract.ps1` | PowerShell Script | `.github/genome/` | +| 2 | `genome-distill.prompt.md` | Prompt | `.github/genome/` | +| 3 | `genome-propagate.prompt.md` | Prompt | `.github/genome/` | +| 4 | `raw-mutations.md` | Generiert | `.github/genome/output/` | +| 5 | `distilled-mutations.md` | Generiert | `.github/genome/output/` | +| 6 | `propagation-proposals.md` | Generiert | `.github/genome/output/` | + +--- + +## Zukünftige Erweiterungen + +- Multi-Repo-Registry: Zentrale Sammlung von Growth Vectors aus vielen Projekten +- Automatische Erkennung des Evolutionszeitraums über Repo-Vergleich +- CI-Integration: Propagation-Check bei jedem Push +- Community-Sharing: Öffentliche Growth Vectors als "Trait Packages"