refactor(genome): restructure as skill + prompt verbund
- Skill: .github/skills/genome/ (SKILL.md + genome-extract.py) - Router: .github/prompts/genome.prompt.md (orchestriert alle 3 Phasen) - Sub-Prompts: genome-distill.prompt.md, genome-propagate.prompt.md - Output: .github/genome/output/ (gitignored) Aufruf: /genome → fragt Quell-Repo + Zeitspanne, führt Extraction → Distillation → Propagation durch.
This commit is contained in:
parent
9cc69678e7
commit
7ccd2dc1fd
7 changed files with 155 additions and 2 deletions
6
.github/genome/output/.gitkeep
vendored
Normal file
6
.github/genome/output/.gitkeep
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Genome Engine Output
|
||||||
|
|
||||||
|
Generierte Dateien (nicht committen):
|
||||||
|
- `raw-mutations.md`
|
||||||
|
- `distilled-mutations.md`
|
||||||
|
- `propagation-proposals.md`
|
||||||
83
.github/prompts/genome.prompt.md
vendored
Normal file
83
.github/prompts/genome.prompt.md
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
---
|
||||||
|
description: "Genome Engine – Erkennt evolutionäre Verbesserungen an Copilot-Customization-Dateien und überträgt sie auf ein Ziel-Repo."
|
||||||
|
agent: agent
|
||||||
|
model: Claude Sonnet 4.6 (copilot)
|
||||||
|
tools: [read, edit, search, execute]
|
||||||
|
---
|
||||||
|
|
||||||
|
# Genome Engine
|
||||||
|
|
||||||
|
> **Skill-Referenz:** Lies `.github/skills/genome/SKILL.md` für das vollständige Konzept.
|
||||||
|
|
||||||
|
Du orchestrierst die 3 Phasen der Genome Engine: **Extraction → Distillation → Propagation**.
|
||||||
|
|
||||||
|
## Parameter ermitteln
|
||||||
|
|
||||||
|
Frage den User (falls nicht angegeben):
|
||||||
|
|
||||||
|
1. **Quell-Repo** – Pfad zum Repository mit den Verbesserungen (Default: aktuelles Repo)
|
||||||
|
2. **Zeitspanne** – Seit wann nach Mutations suchen (Default: "7 days ago")
|
||||||
|
3. **Ziel-Repo** – Pfad zum Repo, das die Verbesserungen erhalten soll (Default: aktuelles Repo)
|
||||||
|
|
||||||
|
> Wenn Quell- und Ziel-Repo identisch sind: Extraction + Distillation durchführen, aber Propagation überspringen (sinnlos auf sich selbst).
|
||||||
|
|
||||||
|
## Phase 1: Extraction
|
||||||
|
|
||||||
|
Führe das Extraction-Script aus:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python .github/skills/genome/genome-extract.py --since "<zeitspanne>" --repo "<quell-repo>" --output ".github/genome/output/raw-mutations.md"
|
||||||
|
```
|
||||||
|
|
||||||
|
Prüfe das Ergebnis:
|
||||||
|
- Wenn 0 Traits gefunden: Melde "Keine Mutations im Zeitraum" und stoppe.
|
||||||
|
- Sonst: Zeige kurze Zusammenfassung (Anzahl Traits, Anzahl Mutations) und weiter zu Phase 2.
|
||||||
|
|
||||||
|
## Phase 2: Distillation
|
||||||
|
|
||||||
|
Führe jetzt die Distillation durch. Folge den Anweisungen aus `.github/prompts/genome-distill.prompt.md`:
|
||||||
|
|
||||||
|
1. Lies `.github/genome/output/raw-mutations.md`
|
||||||
|
2. Klassifiziere jede Mutation (🔴 Critical / 🟡 Evolution / ⚪ Specialized)
|
||||||
|
3. Score den Übertragungswert (1–10)
|
||||||
|
4. Sanitize sensitive Daten
|
||||||
|
5. Filtere Specialized + Score < 4
|
||||||
|
6. Schreibe `.github/genome/output/distilled-mutations.md`
|
||||||
|
|
||||||
|
Zeige dem User eine Zusammenfassung:
|
||||||
|
```
|
||||||
|
Distillation: X Critical, Y Evolution (Z Specialized entfernt)
|
||||||
|
```
|
||||||
|
|
||||||
|
Wenn 0 Critical + 0 Evolution übrig: Melde "Keine übertragbaren Mutations" und stoppe.
|
||||||
|
|
||||||
|
## Phase 3: Propagation
|
||||||
|
|
||||||
|
> **Nur wenn Quell-Repo ≠ Ziel-Repo.**
|
||||||
|
|
||||||
|
Führe die Propagation durch. Folge den Anweisungen aus `.github/prompts/genome-propagate.prompt.md`:
|
||||||
|
|
||||||
|
1. Lies `.github/genome/output/distilled-mutations.md`
|
||||||
|
2. Scanne das Ziel-Genome (`.github/` des Ziel-Repos)
|
||||||
|
3. Matche Traits und generiere Patches
|
||||||
|
4. Zeige die Checkliste:
|
||||||
|
- `[x]` Critical (default an)
|
||||||
|
- `[x]` Evolution mit Score ≥ 7 (default an)
|
||||||
|
- `[ ]` Evolution mit Score < 7 (default aus)
|
||||||
|
|
||||||
|
Frage den User:
|
||||||
|
> **Welche Vorschläge soll ich anwenden?** (Nummern, "alle", "critical+evolution≥7", oder "keine")
|
||||||
|
|
||||||
|
Wende die ausgewählten Patches an.
|
||||||
|
|
||||||
|
## Abschluss
|
||||||
|
|
||||||
|
Zeige eine Zusammenfassung:
|
||||||
|
```
|
||||||
|
Genome Engine abgeschlossen:
|
||||||
|
Quell-Repo: <name>
|
||||||
|
Zeitraum: <since>
|
||||||
|
Extrahiert: X Traits, Y Mutations
|
||||||
|
Destilliert: A Critical, B Evolution
|
||||||
|
Angewendet: N Patches
|
||||||
|
```
|
||||||
61
.github/skills/genome/SKILL.md
vendored
Normal file
61
.github/skills/genome/SKILL.md
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
# Genome Engine
|
||||||
|
|
||||||
|
Automatische Erkennung und Übertragung evolutionärer Verbesserungen an Copilot-Customization-Dateien (Skills, Agents, Prompts, Instructions) zwischen Repositories.
|
||||||
|
|
||||||
|
## Trigger-Phrasen
|
||||||
|
|
||||||
|
`genome`, `propagate`, `mutations übertragen`, `traits synchronisieren`, `genome extract`, `genome propagate`
|
||||||
|
|
||||||
|
## Konzept
|
||||||
|
|
||||||
|
Die Genome Engine erkennt Verbesserungen an Copilot-Konfigurationsdateien über Git-History, destilliert sie in übertragbare "Growth Vectors" und schlägt konkrete Patches für andere Repos vor.
|
||||||
|
|
||||||
|
**Begriffe:**
|
||||||
|
- **Trait** – Ein Skill, Agent, Prompt(-Verbund) oder Instructions-File
|
||||||
|
- **Genome** – Die Gesamtheit aller Traits eines Projekts
|
||||||
|
- **Mutation** – Ein Git-Commit-Delta an einem Trait
|
||||||
|
- **Growth Vector** – Destillierte, bewertete Mutation (bereinigt, klassifiziert, gescored)
|
||||||
|
- **Propagation** – Konkreter Änderungsvorschlag für ein Ziel-Genome
|
||||||
|
|
||||||
|
## Pipeline
|
||||||
|
|
||||||
|
| Phase | Tool | Input → Output |
|
||||||
|
|-------|------|----------------|
|
||||||
|
| 1. Extraction | `genome-extract.py` | Git-History → `raw-mutations.md` |
|
||||||
|
| 2. Distillation | `genome-distill.prompt.md` | `raw-mutations.md` → `distilled-mutations.md` |
|
||||||
|
| 3. Propagation | `genome-propagate.prompt.md` | `distilled-mutations.md` + Ziel-Genome → Patches |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
/genome
|
||||||
|
```
|
||||||
|
|
||||||
|
Der Router-Prompt fragt nach Quell-Repo und Zeitspanne, dann orchestriert er alle 3 Phasen.
|
||||||
|
|
||||||
|
## Dateien
|
||||||
|
|
||||||
|
| Datei | Zweck |
|
||||||
|
|-------|-------|
|
||||||
|
| `SKILL.md` | Diese Dokumentation |
|
||||||
|
| `genome-extract.py` | Phase 1: Git-Scanning + Trait-Erkennung |
|
||||||
|
|
||||||
|
## Trait-Erkennung
|
||||||
|
|
||||||
|
Pfade werden automatisch zu Trait-Keys aufgelöst:
|
||||||
|
|
||||||
|
```
|
||||||
|
.github/skills/gh-tickets/SKILL.md → skill/gh-tickets
|
||||||
|
.github/agents/code-reviewer.agent.md → agent/code-reviewer
|
||||||
|
.github/prompts/nextstep.prompt.md → prompt/nextstep (inkl. Sub-Prompts)
|
||||||
|
.github/copilot-instructions.md → instructions/copilot-instructions
|
||||||
|
```
|
||||||
|
|
||||||
|
## Genome-Scope
|
||||||
|
|
||||||
|
Folgende Pfade bilden das Genome:
|
||||||
|
- `.github/skills/**`
|
||||||
|
- `.github/agents/**`
|
||||||
|
- `.github/prompts/**`
|
||||||
|
- `.github/copilot-instructions.md`
|
||||||
|
- `.github/*.instructions.md`
|
||||||
|
|
@ -7,8 +7,8 @@ Scannt git log für Änderungen im Genome-Scope (.github/skills, agents, prompts
|
||||||
Gruppiert Diffs nach Trait und gibt strukturiertes Markdown aus.
|
Gruppiert Diffs nach Trait und gibt strukturiertes Markdown aus.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
python .github/genome/genome-extract.py --since "7 days ago"
|
python .github/skills/genome/genome-extract.py --since "7 days ago"
|
||||||
python .github/genome/genome-extract.py --since "4 days ago" --repo /path/to/repo
|
python .github/skills/genome/genome-extract.py --since "4 days ago" --repo /path/to/repo
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -36,3 +36,6 @@ memories/session/
|
||||||
# Environment secrets (never commit)
|
# Environment secrets (never commit)
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
|
||||||
|
# Genome Engine generated output
|
||||||
|
.github/genome/output/*.md
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue