mindnet/docs/03_Technical_References/03_tech_configuration.md
2025-12-16 18:46:11 +01:00

143 lines
6.1 KiB
Markdown

---
doc_type: technical_reference
audience: developer, admin
scope: configuration, env
status: active
version: 2.7.0
context: "Referenztabellen für Umgebungsvariablen und YAML-Konfigurationen."
---
# Konfigurations-Referenz
Dieses Dokument beschreibt die Steuerungsdateien von Mindnet.
## 1. Environment Variablen (`.env`)
Diese Variablen steuern die Infrastruktur, Timeouts und Feature-Flags.
| Variable | Default | Beschreibung |
| :--- | :--- | :--- |
| `QDRANT_URL` | `http://localhost:6333` | URL zur Vektor-DB API. |
| `QDRANT_API_KEY` | *(leer)* | Optionaler Key für Absicherung. |
| `COLLECTION_PREFIX` | `mindnet` | Namensraum für Collections (erzeugt `{prefix}_notes` etc). |
| `VECTOR_DIM` | `768` | **Muss 768 sein** (für Nomic Embeddings). |
| `MINDNET_TYPES_FILE` | `config/types.yaml` | Pfad zur Typ-Registry. |
| `MINDNET_RETRIEVER_CONFIG`| `config/retriever.yaml`| Pfad zur Scoring-Konfiguration. |
| `MINDNET_DECISION_CONFIG` | `config/decision_engine.yaml` | Pfad zur Router & Intent Config. |
| `MINDNET_PROMPTS_PATH` | `config/prompts.yaml` | Pfad zu LLM Prompts. |
| `MINDNET_LLM_MODEL` | `phi3:mini` | Name des Chat-Modells (Ollama). |
| `MINDNET_EMBEDDING_MODEL` | `nomic-embed-text` | Name des Embedding-Modells (Ollama). |
| `MINDNET_OLLAMA_URL` | `http://127.0.0.1:11434`| URL zum LLM-Server. |
| `MINDNET_LLM_TIMEOUT` | `300.0` | Timeout in Sekunden (Erhöht für CPU Cold-Starts). |
| `MINDNET_API_TIMEOUT` | `300.0` | Frontend Timeout (Erhöht für Smart Edge Wartezeiten). |
| `MINDNET_LLM_BACKGROUND_LIMIT`| `2` | **Traffic Control (Neu):** Max. parallele Import-Tasks (Semaphore). |
| `MINDNET_VAULT_ROOT` | `./vault` | Pfad für Write-Back Operationen (Drafts). |
| `MINDNET_CHANGE_DETECTION_MODE` | `full` | **Change Detection (Neu):** `full` (Text + Meta) oder `body` (nur Text). |
---
## 2. Typ-Registry (`types.yaml`)
Steuert das Import-Verhalten, Chunking und die Kanten-Logik pro Typ.
### 2.1 Konfigurations-Hierarchie (Override-Logik)
Seit Version 2.7.0 gilt für `chunking_profile` und `retriever_weight` folgende Priorität:
1. **Frontmatter (Höchste Prio):** Ein Wert direkt in der Markdown-Datei überschreibt alles.
* *Beispiel:* `chunking_profile: structured_smart_edges_strict` im Header einer Notiz erzwingt diesen Splitter, egal welcher Typ eingestellt ist.
2. **Type Config:** Der Standardwert für den `type` (z.B. `concept`) aus `types.yaml`.
3. **Global Default:** Fallback aus `defaults` in `types.yaml`.
### 2.2 Typ-Referenztabelle
| Typ (`type`) | Chunk Profile (Standard) | Retriever Weight | Smart Edges? | Beschreibung |
| :--- | :--- | :--- | :--- | :--- |
| **concept** | `sliding_smart_edges` | 0.60 | Ja | Abstrakte Begriffe. |
| **project** | `sliding_smart_edges` | 0.97 | Ja | Aktive Vorhaben. |
| **decision** | `structured_smart_edges_strict` | 1.00 | Ja | Entscheidungen (ADRs). Atomar. |
| **experience** | `sliding_smart_edges` | 0.90 | Ja | Persönliche Learnings. |
| **journal** | `sliding_standard` | 0.80 | Nein | Logs / Dailies. |
| **value** | `structured_smart_edges_strict` | 1.00 | Ja | Werte/Prinzipien. Atomar. |
| **risk** | `sliding_short` | 0.90 | Nein | Risiken. |
| **person** | `sliding_standard` | 0.50 | Nein | Profile. |
| **source** | `sliding_standard` | 0.50 | Nein | Externe Quellen. |
| **event** | `sliding_standard` | 0.60 | Nein | Meetings. |
| **goal** | `sliding_smart_edges` | 0.95 | Nein | Strategische Ziele. |
| **belief** | `sliding_short` | 0.90 | Nein | Glaubenssätze. |
| **profile** | `structured_smart_edges_strict` | 0.70 | Nein | Rollenprofile. Strict Split. |
| **principle** | `structured_smart_edges_strict_L3`| 0.95 | Nein | Prinzipien. Tiefer Split (H3) für Mikro-Prinzipien. |
| **task** | `sliding_short` | 0.80 | Nein | Aufgaben. |
| **glossary** | `sliding_short` | 0.40 | Nein | Begriffsdefinitionen. |
| **default** | `sliding_standard` | 1.00 | Nein | Fallback. |
*Hinweis: `Smart Edges?` entspricht dem YAML-Key `enable_smart_edge_allocation: true`.*
---
## 3. Retriever Config (`retriever.yaml`)
Steuert die Gewichtung der Scoring-Formel (WP04a).
**Beispielkonfiguration:**
```yaml
scoring:
semantic_weight: 1.0 # Basis-Relevanz (Cosine Similarity)
edge_weight: 0.7 # Einfluss des Graphen (Bonus)
centrality_weight: 0.5 # Einfluss von Hubs
edge_weights:
# Multiplikatoren für den Edge-Bonus
depends_on: 1.5 # Harte Abhängigkeiten stark gewichten
blocks: 1.5 # Risiken stark gewichten
caused_by: 1.2 # Kausalitäten stärken
related_to: 0.5 # Weiche Themen schwächer gewichten
references: 0.8 # Standard-Referenzen
based_on: 1.3 # Werte-Bezug
```
---
## 4. Edge Typen Referenz
Definiert die Semantik der `kind`-Felder in der Edge-Collection.
| Kind | Symmetrisch? | Herkunft (Primär) | Bedeutung |
| :--- | :--- | :--- | :--- |
| `references` | Nein | Wikilink | Standard-Verweis. "Erwähnt X". |
| `belongs_to` | Nein | Struktur | Chunk gehört zu Note. |
| `next` / `prev` | Ja | Struktur | Lesereihenfolge. |
| `depends_on` | Nein | Inline / Default | Harte Abhängigkeit. |
| `related_to` | Ja | Callout / Default | Thematische Nähe. |
| `similar_to` | Ja | Inline | Inhaltliche Ähnlichkeit. |
| `caused_by` | Nein | Inline | Kausalität. |
| `solves` | Nein | Inline | Lösung für ein Problem. |
| `blocks` | Nein | Inline | Blockade / Risiko. |
| `derived_from` | Nein | Matrix | Herkunft (z.B. Prinzip -> Buch). |
| `based_on` | Nein | Matrix | Fundament (z.B. Erfahrung -> Wert). |
| `uses` | Nein | Matrix | Nutzung (z.B. Projekt -> Tool). |
---
## 5. Decision Engine (`decision_engine.yaml`)
Steuert den Hybrid Router (WP06). Definiert, welche Keywords welche Strategie auslösen.
**Beispielauszug:**
```yaml
# Strategie-Definitionen
strategies:
DECISION:
description: "Hilfe bei Entscheidungen"
inject_types: ["value", "principle", "goal", "risk"] # Strategic Retrieval
llm_fallback_enabled: true
INTERVIEW:
description: "Wissenserfassung"
trigger_keywords: ["erstellen", "neu", "anlegen", "festhalten"]
EMPATHY:
description: "Emotionaler Support"
inject_types: ["experience", "belief"]
```