- Added new sections for WP-26 integration, including links to the Lastenheft, interface specification, and implementation checklist. - Enhanced the overall structure of the documentation index to improve navigation and accessibility of WP-26 related resources.
359 lines
9.5 KiB
Markdown
359 lines
9.5 KiB
Markdown
# WP-26 Implementierungs-Checkliste für mindnet_obsidian Plugin
|
|
|
|
**Version:** 1.0
|
|
**Datum:** 25. Januar 2026
|
|
**Status:** Implementierungsleitfaden
|
|
**Basis:** [WP26_Plugin_Interface_Specification.md](./WP26_Plugin_Interface_Specification.md)
|
|
|
|
---
|
|
|
|
## Übersicht
|
|
|
|
Diese Checkliste dient als Implementierungsleitfaden für die Integration von WP-26 Features (Section Types & Intra-Note-Edges) in das mindnet_obsidian Plugin.
|
|
|
|
**Referenz:** Vollständige Spezifikation siehe `WP26_Plugin_Interface_Specification.md`
|
|
|
|
---
|
|
|
|
## Phase 1: Grundlagen (Kern-Parsing)
|
|
|
|
### ✅ 1.1 Section-Type-Parsing
|
|
|
|
**Datei:** `src/mapping/sectionParser.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] Funktion `extractSectionType(content: string): string | null` hinzufügen
|
|
- Regex: `/^\s*>\s*\[!section\]\s*(\w+)/`
|
|
- Suche in gesamter Section (nicht nur direkt nach Heading)
|
|
- [ ] Funktion `extractBlockId(heading: string): string | null` hinzufügen
|
|
- Regex: `/\^([a-zA-Z0-9_-]+)/`
|
|
- [ ] Interface `NoteSection` erweitern:
|
|
```typescript
|
|
sectionType?: string;
|
|
blockId?: string;
|
|
```
|
|
- [ ] `splitIntoSections()` erweitern:
|
|
- Extrahiere Section-Type aus Content
|
|
- Extrahiere Block-ID aus Heading
|
|
- Propagiere Section-Type retroaktiv zur Überschrift
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/mapping/sectionTypeParser.test.ts` erstellen
|
|
- [ ] Test: Section-Type an beliebiger Stelle in Section
|
|
- [ ] Test: Block-ID-Extraktion aus Heading
|
|
- [ ] Test: Retroaktive Propagation
|
|
|
|
---
|
|
|
|
### ✅ 1.2 Edge-Parsing-Erweiterung
|
|
|
|
**Datei:** `src/parser/parseEdgesFromCallouts.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] Funktion `extractBlockId(link: string): string | null` hinzufügen
|
|
- Erkenne `[[#^block-id]]`
|
|
- Erkenne `[[#Section Name ^block-id]]` → extrahiere nur `block-id`
|
|
- [ ] Interface `ParsedEdge` erweitern:
|
|
```typescript
|
|
isInternal?: boolean;
|
|
blockIds?: string[];
|
|
```
|
|
- [ ] `parseEdgesFromCallouts()` erweitern:
|
|
- Extrahiere Block-IDs aus Targets
|
|
- Setze `isInternal: true` wenn alle Targets Block-IDs sind
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/parser/parseEdgesFromCallouts.test.ts` erweitern
|
|
- [ ] Test: Block-ID-Extraktion aus `[[#^block-id]]`
|
|
- [ ] Test: Block-ID-Extraktion aus `[[#Section ^block-id]]`
|
|
- [ ] Test: `isInternal` Flag für Intra-Note-Edges
|
|
|
|
---
|
|
|
|
### ✅ 1.3 Graph-Schema-Loader
|
|
|
|
**Datei:** `src/schema/GraphSchemaLoader.ts` (NEU)
|
|
|
|
**Tasks:**
|
|
- [ ] Klasse `GraphSchemaLoader` erstellen (analog zu `ChainRolesLoader.ts`)
|
|
- [ ] Parse `Dictionary/graph_schema.md`:
|
|
- Format: `## Source: \`type\``
|
|
- Tabelle: `| Target | Typical | Prohibited |`
|
|
- [ ] Funktion `loadGraphSchema(): GraphSchema` implementieren
|
|
- [ ] Funktion `getTypicalEdgeFor(sourceType, targetType): string | null` implementieren
|
|
- [ ] Funktion `getTopologyInfo(sourceType, targetType): {typical, prohibited}` implementieren
|
|
- [ ] Fallback-Logik: exact → "any" → "default"
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/schema/graphSchemaLoader.test.ts` erstellen
|
|
- [ ] Test: Schema-Loading
|
|
- [ ] Test: Typical Edge Lookup
|
|
- [ ] Test: Fallback-Logik
|
|
|
|
---
|
|
|
|
## Phase 2: UI-Komponenten
|
|
|
|
### ✅ 2.1 Section-Type-Modal
|
|
|
|
**Datei:** `src/ui/SectionTypeModal.ts` (NEU)
|
|
|
|
**Tasks:**
|
|
- [ ] Modal-Komponente erstellen
|
|
- [ ] Type-Auswahl aus `types.yaml` (via `DictionaryLoader`)
|
|
- [ ] Block-ID-Generierung/-Bearbeitung
|
|
- [ ] Vorschau: Wie wird es im Backend interpretiert?
|
|
- [ ] Integration in Commands
|
|
|
|
**UI-Features:**
|
|
- [ ] Dropdown für Section-Type-Auswahl
|
|
- [ ] Input-Feld für Block-ID (mit Auto-Generierung)
|
|
- [ ] Vorschau-Panel
|
|
- [ ] Save/Cancel Buttons
|
|
|
|
---
|
|
|
|
### ✅ 2.2 Block-ID-Autovervollständigung
|
|
|
|
**Datei:** `src/ui/LinkPromptModal.ts` (ERWEITERN)
|
|
|
|
**Tasks:**
|
|
- [ ] Block-ID-Suggestions hinzufügen
|
|
- [ ] Format: `[[#^block-id]]` mit Heading-Vorschau
|
|
- [ ] Filterung nach Section-Type (optional)
|
|
- [ ] Integration in Edge-Editing-Flows
|
|
|
|
**UI-Features:**
|
|
- [ ] Autovervollständigung für Block-IDs
|
|
- [ ] Zeige Heading + Section-Type in Vorschau
|
|
- [ ] Unterscheidung: Intra-Note vs. Inter-Note Links
|
|
|
|
---
|
|
|
|
### ✅ 2.3 Edge-Type-Chooser-Erweiterung
|
|
|
|
**Datei:** `src/ui/EdgeTypeChooserModal.ts` (ERWEITERN)
|
|
|
|
**Tasks:**
|
|
- [ ] Section-Type-basierte Vorschläge integrieren
|
|
- [ ] Schema-Validierung (Visual Feedback)
|
|
- [ ] Nutze `GraphSchemaLoader` für Vorschläge
|
|
- [ ] Zeige Warnungen bei "prohibited" Edges
|
|
|
|
**UI-Features:**
|
|
- [ ] ✅ Typisch (grün)
|
|
- [ ] ⚠️ Atypisch (gelb)
|
|
- [ ] ❌ Verboten (rot)
|
|
- [ ] Vorschläge basierend auf Source/Target Section-Types
|
|
|
|
---
|
|
|
|
## Phase 3: Feature-Integration
|
|
|
|
### ✅ 3.1 Interview-Wizard-Integration
|
|
|
|
**Dateien:**
|
|
- `src/interview/types.ts`
|
|
- `src/interview/renderer.ts`
|
|
- `src/interview/wizardState.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] `CaptureTextStep` erweitern:
|
|
```typescript
|
|
sectionType?: string;
|
|
output?: {
|
|
includeSectionCallout?: boolean;
|
|
};
|
|
```
|
|
- [ ] `CaptureTextLineStep` erweitern:
|
|
```typescript
|
|
output?: {
|
|
generateBlockId?: boolean;
|
|
blockIdFromKey?: boolean;
|
|
};
|
|
```
|
|
- [ ] `renderer.ts` erweitern:
|
|
- Funktion `renderSectionWithType()` hinzufügen
|
|
- Automatische `[!section]` Callout-Einfügung
|
|
- Automatische Block-ID-Generierung
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/interview/renderer.test.ts` erweitern
|
|
- [ ] Test: Section-Type-Rendering
|
|
- [ ] Test: Block-ID-Generierung
|
|
|
|
---
|
|
|
|
### ✅ 3.2 Chain-Workbench-Integration
|
|
|
|
**Dateien:**
|
|
- `src/workbench/types.ts`
|
|
- `src/workbench/todoGenerator.ts`
|
|
- `src/analysis/chainInspector.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] `WorkbenchMatch` erweitern:
|
|
```typescript
|
|
sectionTypes?: Map<string, string>;
|
|
```
|
|
- [ ] `MissingLinkTodo` erweitern:
|
|
```typescript
|
|
fromSectionType?: string;
|
|
toSectionType?: string;
|
|
```
|
|
- [ ] `todoGenerator.ts` erweitern:
|
|
- Berücksichtige Section-Types bei Edge-Type-Vorschlägen
|
|
- Nutze `graph_schema.md` für Vorschläge
|
|
- [ ] `chainInspector.ts` erweitern:
|
|
- Erkenne Intra-Note-Edges
|
|
- Nutze Section-Types für besseres Matching
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/workbench/todoGenerator.test.ts` erweitern
|
|
- [ ] Test: Section-Type-basierte Vorschläge
|
|
|
|
---
|
|
|
|
### ✅ 3.3 Mapping-Integration
|
|
|
|
**Dateien:**
|
|
- `src/mapping/mappingBuilder.ts`
|
|
- `src/mapping/semanticMappingBuilder.ts`
|
|
- `src/mapping/updateMappingBlocks.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] `MappingContext` erweitern:
|
|
```typescript
|
|
sectionTypes: Map<string, string>;
|
|
blockIds: Map<string, string>;
|
|
```
|
|
- [ ] Funktion `generateIntraNoteEdges()` hinzufügen:
|
|
- Generiere automatische Edges zwischen Sections
|
|
- Nutze `graph_schema.md` für Default-Edge-Types
|
|
- Nur wenn keine expliziten Edges vorhanden
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/mapping/mappingBuilder.test.ts` erweitern
|
|
- [ ] Test: Automatische Intra-Note-Edge-Generierung
|
|
|
|
---
|
|
|
|
## Phase 4: Validierung & Linting
|
|
|
|
### ✅ 4.1 Lint-Rules
|
|
|
|
**Dateien:** `src/lint/rules/` (NEU)
|
|
|
|
**Tasks:**
|
|
|
|
#### 4.1.1 Section-Type-Validierung
|
|
- [ ] `rule_section_type.ts` erstellen
|
|
- [ ] Prüfe: Section-Type muss in `types.yaml` existieren
|
|
- [ ] Warnung: Fehlende Block-IDs für referenzierte Sections
|
|
- [ ] Warnung: Section-Types ohne explizite Edges
|
|
|
|
#### 4.1.2 Edge-Validierung
|
|
- [ ] `rule_unkown_edge.ts` erweitern
|
|
- [ ] Prüfe: Edge-Types gegen `graph_schema.md` (prohibited)
|
|
- [ ] Warnung: Atypische Edges (nicht in "typical")
|
|
|
|
#### 4.1.3 Block-ID-Validierung
|
|
- [ ] `rule_block_id.ts` erstellen
|
|
- [ ] Warnung: Fehlende Block-IDs für referenzierte Sections
|
|
- [ ] Warnung: Doppelte Block-IDs innerhalb einer Note
|
|
- [ ] Warnung: Unbenutzte Block-IDs
|
|
|
|
**Tests:**
|
|
- [ ] `src/tests/lint/rules/rule_section_type.test.ts` erstellen
|
|
- [ ] `src/tests/lint/rules/rule_block_id.test.ts` erstellen
|
|
|
|
---
|
|
|
|
### ✅ 4.2 Vault-Triage-Erweiterung
|
|
|
|
**Dateien:**
|
|
- `src/workbench/vaultTriageScan.ts`
|
|
- `src/commands/vaultTriageScanCommand.ts`
|
|
|
|
**Tasks:**
|
|
- [ ] Erkenne Notes ohne Section-Types
|
|
- [ ] Erkenne fehlende Block-IDs bei referenzierten Sections
|
|
- [ ] Erkenne Intra-Note-Edges, die noch nicht explizit sind
|
|
- [ ] Zeige Verbesserungsvorschläge
|
|
|
|
---
|
|
|
|
## Phase 5: Commands
|
|
|
|
### ✅ 5.1 Neue Commands
|
|
|
|
**Datei:** `src/main.ts` (Command-Registrierung)
|
|
|
|
**Tasks:**
|
|
|
|
#### 5.1.1 "Add Section Type"
|
|
- [ ] Command-ID: `mindnet:add-section-type`
|
|
- [ ] Öffne `SectionTypeModal`
|
|
- [ ] Füge `[!section]` Callout zur aktuellen Section hinzu
|
|
- [ ] Generiere Block-ID falls nicht vorhanden
|
|
|
|
#### 5.1.2 "Add Block ID to Heading"
|
|
- [ ] Command-ID: `mindnet:add-block-id`
|
|
- [ ] Füge Block-ID zur aktuellen Überschrift hinzu
|
|
- [ ] Generiere ID aus Heading-Text (slugified)
|
|
|
|
#### 5.1.3 "Insert Intra-Note Edge"
|
|
- [ ] Command-ID: `mindnet:insert-intra-note-edge`
|
|
- [ ] Füge `[!edge]` Callout mit Block-Reference hinzu
|
|
- [ ] Zeige Autovervollständigung für Block-IDs
|
|
|
|
---
|
|
|
|
## Phase 6: Dokumentation
|
|
|
|
### ✅ 6.1 Benutzerhandbuch
|
|
|
|
**Datei:** `docs/01_Benutzerhandbuch.md`
|
|
|
|
**Tasks:**
|
|
- [ ] Abschnitt "Section Types" hinzufügen
|
|
- [ ] Abschnitt "Intra-Note-Edges" hinzufügen
|
|
- [ ] Abschnitt "Block-IDs" hinzufügen
|
|
- [ ] Quick-Start-Guide für WP-26 Features
|
|
|
|
---
|
|
|
|
### ✅ 6.2 Entwicklerhandbuch
|
|
|
|
**Datei:** `docs/03_Entwicklerhandbuch.md`
|
|
|
|
**Tasks:**
|
|
- [ ] Abschnitt "WP-26 Integration" hinzufügen
|
|
- [ ] API-Referenz für neue Funktionen
|
|
- [ ] Beispiele für Section-Type-Parsing
|
|
|
|
---
|
|
|
|
## Zusammenfassung
|
|
|
|
| Phase | Komponenten | Status |
|
|
|-------|-------------|--------|
|
|
| **Phase 1** | Section-Parsing, Edge-Parsing, Schema-Loader | ⏳ Offen |
|
|
| **Phase 2** | Section-Type-Modal, Block-ID-Autocomplete, Edge-Chooser | ⏳ Offen |
|
|
| **Phase 3** | Interview, Chain-Workbench, Mapping | ⏳ Offen |
|
|
| **Phase 4** | Lint-Rules, Vault-Triage | ⏳ Offen |
|
|
| **Phase 5** | Commands | ⏳ Offen |
|
|
| **Phase 6** | Dokumentation | ⏳ Offen |
|
|
|
|
---
|
|
|
|
## Nächste Schritte
|
|
|
|
1. **Review der Spezifikation** (`WP26_Plugin_Interface_Specification.md`)
|
|
2. **Priorisierung:** Welche Phase zuerst?
|
|
3. **Start mit Phase 1:** Grundlagen (Parsing & Schema-Loader)
|
|
|
|
---
|
|
|
|
**Ende der Checkliste**
|