[split-required] [guardrail-change] Enforce 500 LOC budget across all services
Install LOC guardrails (check-loc.sh, architecture.md, pre-commit hook) and split all 44 files exceeding 500 LOC into domain-focused modules: - consent-service (Go): models, handlers, services, database splits - backend-core (Python): security_api, rbac_api, pdf_service, auth splits - admin-core (TypeScript): 5 page.tsx + sidebar extractions - pitch-deck (TypeScript): 6 slides, 3 UI components, engine.ts splits - voice-service (Python): enhanced_task_orchestrator split Result: 0 violations, 36 exempted (pipeline, tests, pure-data files). Go build verified clean. No behavior changes — pure structural splits. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,25 @@ git push origin main
|
||||
**NIEMALS** manuell in Orca auf "Redeploy" klicken — Gitea Actions triggert Orca automatisch.
|
||||
**IMMER auf `main` pushen** — sowohl origin als auch gitea.
|
||||
|
||||
### TEMPORAER: Compliance-Repo Refactoring (Stand 2026-04-12)
|
||||
|
||||
**Das Compliance-Repo wird aktuell auf Production (gitea) refakturiert.**
|
||||
|
||||
- **Core + Lehrer:** Normal auf `main` pushen (origin + gitea) ✅
|
||||
- **Compliance auf Mac Mini (origin):** Normal auf `main` pushen ✅
|
||||
- **Compliance auf Production (gitea):** **NUR Feature Branches**, NICHT auf `main` pushen! ⚠️
|
||||
|
||||
```bash
|
||||
# Compliance-Repo — RICHTIG:
|
||||
git push origin main # Mac Mini OK
|
||||
git push gitea feature/mein-feature # Production: nur Feature Branch!
|
||||
|
||||
# Compliance-Repo — FALSCH (waehrend Refactoring):
|
||||
# git push gitea main # NICHT MACHEN!
|
||||
```
|
||||
|
||||
**Nach Abschluss des Refactorings:** Gesamten Compliance-Code einmalig von Production auf Mac Mini uebernehmen. User sagt Bescheid wann es soweit ist.
|
||||
|
||||
### Post-Push Deploy-Monitoring (PFLICHT nach jedem Push auf gitea)
|
||||
|
||||
**IMMER wenn Claude auf gitea pusht, MUSS danach automatisch das Deploy-Monitoring laufen:**
|
||||
@@ -318,6 +337,46 @@ npx tsc --noEmit && npm run lint && npm run build
|
||||
|
||||
---
|
||||
|
||||
## Code-Qualitaet Guardrails (NON-NEGOTIABLE)
|
||||
|
||||
> Vollstaendige Details: `.claude/rules/architecture.md`
|
||||
> Ausnahmen: `.claude/rules/loc-exceptions.txt`
|
||||
|
||||
### File Size Budget
|
||||
|
||||
- **Hard Cap: 500 LOC** pro Datei
|
||||
- Wenn eine Aenderung eine Datei ueber 500 LOC bringen wuerde: **erst splitten, dann aendern**
|
||||
- Ausnahmen nur mit Begruendung in `loc-exceptions.txt` + `[guardrail-change]` Commit-Marker
|
||||
|
||||
### Architektur
|
||||
|
||||
- **Go:** Handler ≤40 LOC → Service-Layer → Repository-Pattern
|
||||
- **Python:** Routes duenn → Business Logic in Services → Persistenz in Repositories
|
||||
- **TypeScript/Next.js:** page.tsx duenn → _components/, _hooks/ auslagern
|
||||
|
||||
### FINGER WEG (laufende RAG Pipeline)
|
||||
|
||||
Diese Verzeichnisse duerfen NICHT refaktoriert werden:
|
||||
- `control-pipeline/` — RAG/Control-Extraction Pipeline
|
||||
- `rag-service/` — Semantische Suche
|
||||
- `embedding-service/` — Text-Embeddings
|
||||
- `voice-service/bqas/` — RAG Quality Assessment
|
||||
|
||||
### LOC-Check ausfuehren
|
||||
|
||||
```bash
|
||||
bash scripts/check-loc.sh --changed # nur geaenderte Dateien
|
||||
bash scripts/check-loc.sh --all # alle Dateien (zeigt alle Violations)
|
||||
```
|
||||
|
||||
### Commit-Marker
|
||||
|
||||
- `[split-required]` — Aenderung beginnt mit Datei-Split
|
||||
- `[guardrail-change]` — Aenderungen an .claude/**, scripts/check-loc.sh
|
||||
- `[interface-change]` — Public API Contracts geaendert
|
||||
|
||||
---
|
||||
|
||||
## Kernprinzipien
|
||||
|
||||
### 1. Open Source Policy
|
||||
|
||||
Reference in New Issue
Block a user