- CLAUDE.md: Comprehensive documentation for core infrastructure - docs-src: Cleaned 316MB junk, kept only markdown docs - mkdocs.yml: Updated nav for core-only content - nginx: Docs proxy targets split (3002->lehrer, 3007->compliance) - docker-compose: Fixed docs port mapping (8009:80), added INSTALL_LOCK - .claude/rules: testing, documentation, open-source-policy, night-scheduler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92 lines
2.3 KiB
Markdown
92 lines
2.3 KiB
Markdown
# Dokumentations-Regeln
|
|
|
|
## Automatische Dokumentations-Aktualisierung
|
|
|
|
**WICHTIG:** Bei JEDER Code-Änderung muss die entsprechende Dokumentation aktualisiert werden!
|
|
|
|
## Wann Dokumentation aktualisieren?
|
|
|
|
### API-Änderungen
|
|
Wenn du einen Endpoint änderst, hinzufügst oder entfernst:
|
|
- Aktualisiere `/docs/api/consent-service-api.md` (Go Endpoints)
|
|
- Aktualisiere `/docs/api/backend-api.md` (Python Endpoints)
|
|
|
|
### Neue Funktionen/Klassen
|
|
Wenn du neue Funktionen, Klassen oder Module erstellst:
|
|
- Aktualisiere `/docs/consent-service/README.md` (für Go)
|
|
- Aktualisiere `/docs/backend/README.md` (für Python)
|
|
|
|
### Architektur-Änderungen
|
|
Wenn du die Systemarchitektur änderst:
|
|
- Aktualisiere `/docs/architecture/system-architecture.md`
|
|
- Aktualisiere `/docs/architecture/data-model.md` (bei DB-Änderungen)
|
|
|
|
### Neue Konfigurationsoptionen
|
|
Wenn du neue Umgebungsvariablen oder Konfigurationen hinzufügst:
|
|
- Aktualisiere die entsprechende README
|
|
- Füge zur `guides/local-development.md` hinzu
|
|
|
|
## Dokumentations-Format
|
|
|
|
### API-Endpoints dokumentieren
|
|
|
|
```markdown
|
|
### METHOD /path/to/endpoint
|
|
|
|
Kurze Beschreibung.
|
|
|
|
**Request Body:**
|
|
\`\`\`json
|
|
{
|
|
"field": "value"
|
|
}
|
|
\`\`\`
|
|
|
|
**Response (200):**
|
|
\`\`\`json
|
|
{
|
|
"result": "value"
|
|
}
|
|
\`\`\`
|
|
|
|
**Errors:**
|
|
- `400`: Beschreibung
|
|
- `401`: Beschreibung
|
|
```
|
|
|
|
### Funktionen dokumentieren
|
|
|
|
```markdown
|
|
### FunctionName (file.go:123)
|
|
|
|
\`\`\`go
|
|
func FunctionName(param Type) ReturnType
|
|
\`\`\`
|
|
|
|
**Beschreibung:** Was macht die Funktion?
|
|
|
|
**Parameter:**
|
|
- `param`: Beschreibung
|
|
|
|
**Rückgabe:** Beschreibung
|
|
```
|
|
|
|
## Checkliste nach Code-Änderungen
|
|
|
|
Vor dem Abschluss einer Aufgabe prüfe:
|
|
|
|
- [ ] Wurden neue API-Endpoints hinzugefügt? → API-Docs aktualisieren
|
|
- [ ] Wurden Datenmodelle geändert? → data-model.md aktualisieren
|
|
- [ ] Wurden neue Konfigurationen hinzugefügt? → README aktualisieren
|
|
- [ ] Wurden neue Abhängigkeiten hinzugefügt? → requirements.txt/go.mod UND Docs
|
|
- [ ] Wurde die Architektur geändert? → architecture/ aktualisieren
|
|
|
|
## Beispiel: Vollständige Dokumentation einer neuen Funktion
|
|
|
|
Wenn du z.B. `GetUserStats()` im Go Service hinzufügst:
|
|
|
|
1. **Code schreiben** in `internal/services/stats_service.go`
|
|
2. **API-Doc aktualisieren** in `docs/api/consent-service-api.md`
|
|
3. **Service-Doc aktualisieren** in `docs/consent-service/README.md`
|
|
4. **Test schreiben** (siehe testing.md)
|