Kilo Code + Qwen3.6 multi-pass review showcase
Find a file
Michael 9890763f0f refactor: split serve.py and index.html into single-responsibility modules
Backend:
- path_validator.py: PathValidator-Klasse für Pfad-Validierung
- file_ops.py: read_file, write_file, directory_exists, file_exists
- content_types.py: get_content_type mit EXTENSION_MAP
- handler.py: Handler-Klasse mit do_GET/do_PUT, nutzt above modules
- serve.py: Entry-Point (main, find_free_port), setzt Handler.validator/directory

Frontend:
- css/variables.css: CSS-Variablen (--bg-*, --text-*, --accent, etc.)
- css/styles.css: Alle CSS-Regeln (modal, card, template-grid, etc.)
- js/utils.js: esc, showToast, copyContentToClipboard
- js/modal.js: showModal, closeModal, closeEditModal, wasViewModalOpen
- js/editor.js: editModalContent, createJsonEditUI, extractJsonFromForm
- js/api.js: viewTemplate, copyContent, loadTemplates, saveEditedContent
- js/templates.js: renderTemplates, applyFilters, parseTypeFromHash
- js/main.js: Event-Listener, Hash-Filter, Initialisierung
- index.html: Inline-CSS/JS entfernt, <link>/<script src>-Tags hinzugefügt

Smoke test: SO_REUSEADDR für schnelle Port-Wiederverwendung
2026-05-03 14:40:44 +02:00
aider_test fix: 7 verbleibende Probleme aus Batch-1-Review behoben 2026-05-03 14:05:55 +02:00
categories feat: Initiales Projekt-Setup für Prompt-Templates 2026-04-24 09:16:29 +02:00
docs fix: /templates.json-Bug, AGENTS.md neu strukturiert, fehlende Stubs angelegt 2026-04-24 13:01:07 +02:00
history fix: /templates.json-Bug, AGENTS.md neu strukturiert, fehlende Stubs angelegt 2026-04-24 13:01:07 +02:00
openhands_test fix: 7 verbleibende Probleme aus Batch-1-Review behoben 2026-05-03 14:05:55 +02:00
scripts refactor: split serve.py and index.html into single-responsibility modules 2026-05-03 14:40:44 +02:00
templates feat: Server-Konfiguration auf Port 8081, Template-Pfade korrigiert sowie brainstorming.md erstellt 2026-04-24 10:46:15 +02:00
web refactor: split serve.py and index.html into single-responsibility modules 2026-05-03 14:40:44 +02:00
.aider.chat.history.md fix: 7 verbleibende Probleme aus Batch-1-Review behoben 2026-05-03 14:05:55 +02:00
.gitignore feat: Initiales Projekt-Setup für Prompt-Templates 2026-04-24 09:16:29 +02:00
AGENTS.md fix: 26 kritische + 29 wichtige Sicherheits- und Robustheitsprobleme behoben 2026-05-03 14:00:55 +02:00
README.md fix: 7 verbleibende Probleme aus Batch-1-Review behoben 2026-05-03 14:05:55 +02:00

Prompt Templates

Eine Sammlung von strukturierten Prompt-Templates für KI-Assistenten. Verwaltet über Git für Versionierung und Kollaboration.


Struktur

prompt_template/
├── templates/              # Haupt-Templates
│   ├── system/             # System-Prompts (Code, Analyse, etc.)
│   ├── user/               # Benutzer-Prompts (Emails, Texte, etc.)
│   └── custom/             # Benutzerdefinierte Templates
│
├── scripts/                # Hilfsskripte
│   └── validate.py          # Template-Validierung
│
├── README.md
└── .gitignore

Web-Ansicht

Der Server startet mit:

python3 web/serve.py          # http://localhost:8081

API-Endpunkte

URL Methode Beschreibung
/ GET Frontend (index.html)
/templates.json GET Katalog (aus web/templates.json)
/templates/system/*.json GET System-Templates
/templates/user/*.md GET User-Templates
/templates/... PUT Template speichern (Content-Type: text/plain)

Validierung

python3 scripts/validate.py --all

Dateiformate

JSON-Templates (strukturiert)

Ein Template-File (z.B. templates/system/code_reviewer.json) hat dieses Schema:

{
  "name": "Template Name",
  "version": "1.0",
  "description": "Beschreibung...",
  "role": "Rolle der KI",
  "template": "Der eigentliche Prompt mit {variables}",
  "variables": {
    "var1": {"type": "string", "required": true, "description": "..."}
  },
  "tags": ["tag1", "tag2"],
  "language": "de"
}

Katalog (web/templates.json)

Der Katalog ist eine Liste von Einträgen mit diesem Schema:

[
  {
    "path": "templates/system/code_reviewer.json",
    "type": "system",
    "name": "Code Reviewer",
    "description": "Analysiert Code auf Qualität",
    "version": "1.0",
    "tags": ["code", "review"],
    "format": "json"
  }
]

Markdown-Templates (einfach)

# Template Name

**Rolle**: Beschreibung

**Template**:

Prompt-Text mit {variables}


**Variablen**:
| Variable | Typ | Required | Beschreibung |

erweitert verwenden

Neues Template hinzufügen

  1. Template in passendem Verzeichnis erstellen (.json oder .md)
  2. Validieren:
    python scripts/validate.py templates/system/mein_template.json
    
  3. Commiten:
    git add templates/system/mein_template.json
    git commit -m "feat: neues Template XY hinzugefügt"
    

Template validieren

# Einzelnes Template
python scripts/validate.py pfad/zum/template.json

# Alle Templates
python scripts/validate.py --all

# Nur JSON-Templates
python scripts/validate.py --type-json

Git Workflow

Branches

  • master / main: Stabile Templates
  • feature/*: Neue Templates in Entwicklung
  • fix/*: Korrekturen an bestehenden Templates

Commit Messages

  • feat: neues Template hinzugefügt
  • fix: Variable in Template XY korrigiert
  • docs: Beschreibung aktualisiert
  • refactor: Template-Struktur verbessert

Tags

Tag Beschreibung
#code Code-bezogene Templates
#text Textgenerierung/Verarbeitung
#creative Kreatives Schreiben
#analysis Analyse-Tasks
#communication Emails, Chat, etc.

Beispiele

Siehe: