Commit Graph

54 Commits

Author SHA1 Message Date
BreakPilot Dev
72a0409c16 refactor(admin-v2): Rename to Admin Lehrer KI and remove migrated categories
Remove communication, infrastructure, and development categories from
navigation (now in Admin Core on port 3008). Rename Admin v2 to
Admin Lehrer KI in sidebar, header, and browser title.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 20:01:09 +01:00
BreakPilot Dev
1723d6ecef chore: Remove large binaries and PDFs from git tracking
Remove compiled Go binaries (90 MB), 1400+ PDFs, and DOCX files
from git tracking. Files remain on disk but are now gitignored.
This reduces the push payload to allow syncing with external Gitea.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:25:27 +01:00
BreakPilot Dev
206183670d feat(sdk): Add Drafting Engine with 4-mode agent system (Explain/Ask/Draft/Validate)
Extends the Compliance Advisor from a Q&A chatbot into a full drafting engine
that can generate, validate, and refine compliance documents within Scope Engine
constraints. Includes intent classifier, state projector, constraint enforcer,
SOUL templates, Go backend endpoints, and React UI components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:37:18 +01:00
BreakPilot Dev
f927c0c205 feat(rag): Add DACH legal corpus ingestion (DE/AT/CH laws)
Add 29 new regulations (7 DE + 7 AT + 4 CH + 11 P2/P3) with country
metadata, legal corpus text excerpts, and updated RAG admin UI with
AT/CH type colors and labels. Fix module path in deploy script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 09:24:33 +01:00
BreakPilot Dev
9fe0a27a60 chore: Add new infrastructure docker-compose draft
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:26:37 +01:00
BreakPilot Dev
81fb1a4499 feat(website): Add Foerderantrag pages and website management section
Add public Foerderantrag (funding application) pages to the website.
Add website management section to admin-v2 with content and status APIs.
Extend Header, LandingContent, and i18n with new navigation entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:26:31 +01:00
BreakPilot Dev
e636b8cef8 feat(rag): Migrate national DPA laws from bp_dsfa_corpus to bp_legal_corpus
Move 23 sources (18 national data protection laws + 5 EDPB guidelines/SCC)
from bp_dsfa_corpus to bp_legal_corpus with vector preservation. Extend
REGULATIONS array with national_law and eu_guideline types. Mark migrated
sources in dsfa_corpus_ingestion.py to prevent re-ingestion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:26:18 +01:00
BreakPilot Dev
f09e24d52c refactor(admin-v2): Consolidate compliance/DSGVO pages into SDK pipeline
Remove duplicate compliance and DSGVO admin pages that have been superseded
by the unified SDK pipeline. Update navigation, sidebar, roles, and module
registry to reflect the new structure. Add DSFA corpus API proxy and
source-policy components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:26:05 +01:00
Benjamin Admin
36603259c6 fix(nav): Change Compliance SDK icon from database to shield
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:48:37 +01:00
Benjamin Admin
9ec5a88af9 fix(sdk): Fix compliance scope wizard — missing labels, broken prefill, invisible helpText
- Rename `label` to `question` in profiling data (35 questions) to match
  ScopeProfilingQuestion type — fixes missing question headings
- Sync ScopeWizardTab props with page.tsx (onEvaluate/canEvaluate/isEvaluating
  instead of onComplete/companyProfile/currentLevel)
- Load companyProfile from SDK context instead of expecting it as prop
- Auto-prefill from company profile on mount when answers are empty
- Add "Aus Profil" badge for prefilled questions
- Replace title-only helpText tooltip with click-to-expand visible info box
- Fix ScopeQuestionBlockId to match actual block IDs in data
- Add `order` field to ScopeQuestionBlock type
- Fix completionStats to count against total required questions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:42:31 +01:00
Benjamin Admin
34f3dbdfc3 fix: Restore missing DSFA catalog data files from stash
These 5 data files were untracked and only saved in git stash.
They are required by catalog-registry.ts for the Katalogverwaltung.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:19:03 +01:00
Benjamin Admin
8ef30e2a76 fix(sdk): Remove catalog-manager from SDK (only accessible via /dashboard)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:54:25 +01:00
Benjamin Admin
50ea4fc44f Merge branch 'main' of http://macmini:3003/pilotadmin/breakpilot-pwa 2026-02-10 12:54:08 +01:00
Benjamin Admin
7b9930596b fix(roles): Add compliance-sdk category to all roles for catalog manager visibility
Without this, the Katalogverwaltung disappears from the dashboard sidebar
when any role (developer, manager, auditor, dsb) is selected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:52:47 +01:00
Benjamin Admin
4ed290ccf3 feat(sdk): Replace mock data with real API calls in consent, DSR, and consent-management
- /sdk/consent: Replace hardcoded mockDocuments with GET /api/admin/consent/documents
- /sdk/dsr: Replace createMockDSRList with fetchSDKDSRList via /api/sdk/v1/dsgvo/dsr
- /sdk/dsr/new: Replace console.log mock with real POST to create DSR requests
- /sdk/dsr/[requestId]: Replace mock lookup with real GET/PUT for DSR details and status updates
- /sdk/consent-management: Add real stats, GDPR process counts, and email template editor
- lib/sdk/dsr/api.ts: Add transformBackendDSR adapter (flat backend → nested frontend types)

Prepares for removal of /dsgvo and /compliance pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:47:19 +01:00
BreakPilot Dev
945b955b54 feat(ocr): Word-based image deskew for Ground Truth pipeline
Begradigt schiefe Scans vor der OCR-Extraktion anhand der linksbuendigen
Wortanfaenge der Vokabelspalte. Tesseract liefert achsenparallele Boxen,
die bei ~2-3 Grad Schraege in Nachbarzeilen bluten — der Deskew behebt das.

- Neue Funktion deskew_image_by_word_alignment() in cv_vocab_pipeline.py
- Deskew-Integration im extract-with-boxes Endpoint (vor OCR)
- Neuer GET Endpoint /deskewed-image/{page} fuer begradigtes Seitenbild
- Frontend: GroundTruthPanel wechselt nach Extraktion auf deskewed Image
- ~1s Overhead durch schnellen Tesseract-Pass auf halbiertem Bild

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:14:44 +01:00
BreakPilot Dev
dd1771be1e feat(admin-v2): Katalogverwaltung ins Admin-Dashboard integrieren
Katalogverwaltung von /sdk/catalog-manager nach /dashboard/catalog-manager
verschoben, damit sie im Admin-Dashboard mit Sidebar erscheint statt im
SDK-Bereich. Shared Components extrahiert, SDK-Route bleibt funktionsfaehig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:12:38 +01:00
BreakPilot Dev
8c77df494b feat(ocr): Add Ground Truth labeling UI for OCR comparison
Adds a step-through tool for creating 100% correct reference data (ground truth)
with position information. Users scan a page, review each vocabulary entry with
image crops, confirm or correct the OCR text, and save the result as JSON.

Backend: extract_entries_with_boxes() helper + 3 endpoints (extract-with-boxes,
ground-truth save/load). Frontend: GroundTruthPanel component with SVG overlay,
ImageCrop, keyboard shortcuts (Enter/Tab/arrows), and tab navigation in page.tsx.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:04:36 +01:00
BreakPilot Dev
d4a23e8d99 fix(compliance-advisor): Update RAG endpoint to use DSFA corpus API
Switch from /admin/legal-corpus/search to /dsfa-rag/search endpoint.
Add RAGResult interface for type safety.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:02:27 +01:00
BreakPilot Dev
0320219d57 chore: Add Compliance Advisor env vars to docker-compose and studio-v2 public dir
- OLLAMA_URL + COMPLIANCE_LLM_MODEL for admin-v2 Compliance Advisor
- extra_hosts for host.docker.internal access
- studio-v2/public/.gitkeep placeholder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:01:38 +01:00
BreakPilot Dev
dff2ef796b feat(admin-v2): Major SDK/Compliance overhaul and new modules
SDK modules added/enhanced:
- compliance-hub, compliance-scope, consent-management, notfallplan
- audit-report, workflow, source-policy, dsms
- advisory-board documentation section
- TOM dashboard components, TOM generator SDM mapping
- DSFA: mitigation library, risk catalog, threshold analysis, source attribution
- VVT: baseline catalog, profiling engine, types
- Loeschfristen: baseline catalog, compliance engine, export, profiling, types
- Compliance scope: engine, profiling, golden tests, types

Existing SDK pages updated:
- dsfa/[id], tom, vvt, loeschfristen, advisory-board — expanded functionality
- SDKSidebar, StepHeader — new navigation items and layout
- SDK layout, context, types — expanded type system

Other admin-v2 changes:
- AI agents page, RAG pipeline DSFA integration
- GridOverlay component updates
- Companion feature (development + education)
- Compliance advisor SOUL definition

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:01:04 +01:00
BreakPilot Dev
53219e3eaf feat(klausur-service): Add Tesseract OCR, DSFA RAG, TrOCR, grid detection and vocab session store
New modules:
- tesseract_vocab_extractor.py: Bounding-box OCR with multi-PSM pipeline
- grid_detection_service.py: CV-based grid/table detection for worksheets
- vocab_session_store.py: PostgreSQL persistence for vocab sessions
- trocr_api.py: TrOCR handwriting recognition endpoint
- dsfa_rag_api.py + dsfa_corpus_ingestion.py: DSFA RAG corpus search

Changes:
- Dockerfile: Install tesseract-ocr + deu/eng language packs
- requirements.txt: Add PyMuPDF, pytesseract, Pillow
- main.py: Register new routers, init DB pools + Qdrant collections

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:00:19 +01:00
BreakPilot Dev
46cb873190 chore: Update .gitignore and remove temp/debug files
Add patterns for .continue/, CLAUDE_CONTINUE.md, backend/BreakpilotDrive/ (1.9GB),
backend/screenshots/, za-download-9/, SSH key notes, and debug artifacts.
Delete ~30 stale temp files from backend/ and docs-src/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:59:20 +01:00
BreakPilot Dev
fa958d31f6 feat(ocr): Add CV Document Reconstruction Pipeline for vocabulary extraction
New OCR method using classical Computer Vision: high-res rendering (432 DPI),
deskew, dewarp, binarization, projection-profile layout analysis, multi-pass
Tesseract OCR with region-specific PSM, and Y-coordinate line alignment.
Includes bugfix for convert_pdf_to_image call (line 869) and 39 unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:52:35 +01:00
BreakPilot Dev
916ecef476 feat(worksheet-editor): Add OCR import panel for grid analysis data
Add OCRImportPanel component and ocr-integration utilities to import
OCR-analyzed data from the grid detection service into the worksheet editor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:50:35 +01:00
BreakPilot Dev
754a812d4b feat(companion): Migrate Companion from admin-v2 to studio-v2 as pure lesson tool
Remove Companion module entirely from admin-v2. Rebuild in studio-v2 as a
focused lesson timer (no dashboard mode). Direct flow: start → active → ended.
Fix timer bug where lastTickRef reset prevented countdown. Add companion link
to Sidebar and i18n translations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:50:20 +01:00
BreakPilot Dev
a7a5674818 fix(ocr-compare): Replace Ollama call in grid analysis with heuristic from comparison results
Ollama crashes when two concurrent vision requests hit the 32B model
(compare-ocr + analyze-grid). The grid analysis was redundantly calling
Ollama again even though compare-ocr already extracted all vocabulary.

- compare-ocr now saves vocabulary in session for reuse
- analyze-grid builds grid from session data (no Ollama, instant response)
- Grid button disabled until comparison results are available
- Added export-to-editor functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:08:13 +01:00
BreakPilot Dev
eef650bf61 feat: Extract Developer Portal as standalone Next.js app on port 3006
SDK customers can now access the documentation publicly without login.
The portal runs independently from admin-v2 on https://macmini:3006/.

- New developer-portal/ app with 26 pages, 2 components
- Docker service + nginx SSL reverse proxy on port 3006
- All /developers/* routes remapped to /* in the new app
- admin-v2 developer pages remain unchanged

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:15:54 +01:00
Benjamin Admin
32afd5ce47 Merge branch 'main' of http://macmini:3003/pilotadmin/breakpilot-pwa 2026-02-09 11:56:29 +01:00
Benjamin Admin
3c181565e0 Add OCR Vergleich to left sidebar navigation
Adds ocr-compare entry in KI-Werkzeuge subgroup of the main
left sidebar navigation (lib/navigation.ts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:56:09 +01:00
BreakPilot Dev
95e0a327c4 feat(dsfa): Add complete 8-section DSFA module with sidebar navigation
Implement DSFA optimization plan based on DSK Kurzpapier Nr. 5:
- Section 0: ThresholdAnalysisSection (WP248, Art. 35 Abs. 3, KI-Trigger)
- Section 5: StakeholderConsultationSection (Art. 35 Abs. 9)
- Section 6: Art36Warning for authority consultation (Art. 36)
- Section 7: ReviewScheduleSection (Art. 35 Abs. 11)
- DSFASidebar with progress tracking for all 8 sections
- Extended DSFASectionProgress for sections 0, 6, 7

Replaces tab navigation with sidebar layout (1/4 + 3/4 grid).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 11:50:04 +01:00
Benjamin Admin
3899c86b29 Fix docs healthcheck: use 127.0.0.1 instead of localhost
Nginx inside the docs container listens on IPv4 (0.0.0.0:80) but
wget resolves localhost to IPv6 (::1), causing connection refused.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:42:29 +01:00
Benjamin Admin
e74a4d3930 Restore missing document-generator files
Restores index.ts (component exports) and page.tsx (793 lines)
for the SDK document generator module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:34:35 +01:00
Benjamin Admin
302565dbac Update CLAUDE.md with current project state
- Add AI Tools section (7 modules incl. OCR Compare, Labeling, RAG)
- Add Lehrer-Tools section (Vocab Worksheet, Korrekturplattform)
- Add Night Mode/Scheduler URLs
- Update Next.js versions (15 for studio-v2/admin-v2)
- Update Docker/Git commands with SSH pattern and /usr/local/bin/docker
- Complete rules directory listing (9 files)
- Remove duplicate internal services table
- Remove redundant Studio URLs section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:31:44 +01:00
Benjamin Admin
4c06953a7a Add OCR Compare, OCR Labeling, RAG Pipeline, Magic Help to AI sidebar
Adds the missing navigation entries and SVG icons for all AI tool
modules so they appear in the sidebar navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:11:46 +01:00
Benjamin Admin
fa5fe4bace Restore OCR Compare page (ocr-compare/page.tsx)
Restores the full OCR comparison tool with vocab extraction,
green grid overlay, labeling, and LLM comparison features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:56:03 +01:00
Benjamin Admin
3ae05a0a2f Add empty public/ directory for admin-v2 Docker build
The Dockerfile COPY step expects /app/public to exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:29:21 +01:00
Benjamin Admin
4ba7babc76 fix(admin-v2): Temporarily ignore TS build errors after restore
Type incompatibilities between restored (98933f5e) and newer files
need to be resolved. This unblocks the build so the frontend is
accessible again.

TODO: Fix type errors and remove ignoreBuildErrors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:24:21 +01:00
Benjamin Admin
770fbdce24 fix(admin-v2): Expand .dockerignore to exclude stale directories
Prevents bloated Docker build context from untracked directories
that appear inside admin-v2 on the Mac Mini.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:20:50 +01:00
Benjamin Admin
bd70b59c5e fix(admin-v2): Restore HEAD SDK files for compatibility with new pages
Restore the SDK context, types, and component files to the HEAD version
since newer pages (company-profile, import) depend on these API changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:18:39 +01:00
Benjamin Admin
613b36be83 fix(admin-v2): Add missing AI tool IDs to AIToolId type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:13:21 +01:00
Benjamin Admin
5f55692ef0 fix(admin-v2): Add missing utils and DSFA components for build
- Add cn() utility function for className merging
- Add DSFACard, RiskMatrix, ApprovalPanel components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:09:36 +01:00
Benjamin Admin
72f6f8dc33 fix(admin-v2): Add missing QRCodeUpload component and fix SDK imports
- Create admin-v2 compatible QRCodeUpload component (adapted from studio-v2)
- Restore working DataPointsPreview and DocumentValidation from HEAD

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:58:57 +01:00
Benjamin Admin
81cfd6ba24 Merge branch 'main' of http://macmini:3003/pilotadmin/breakpilot-pwa 2026-02-09 09:51:48 +01:00
Benjamin Admin
21a844cb8a fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.

This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).

Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:51:32 +01:00
BreakPilot Dev
18838b5273 feat(dashboard): Add Night Mode widget to dashboard
Add a compact Night Mode widget to the main dashboard that allows:
- Quick toggle of night mode on/off
- View countdown to next scheduled action
- Manual start/stop of all services
- See count of running vs stopped services

The widget links to the full night-mode settings page for detailed
configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 00:31:09 -08:00
BreakPilot Dev
f7487ee240 docs(claude): Add two-machine setup documentation
- Clarify MacBook (client) vs Mac Mini (server) roles
- Add examples for correct SSH command execution
- Document browser testing workflow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 00:22:38 -08:00
BreakPilot Dev
ffa3540d1a feat(claude): Add testing, documentation rules and project hooks
- rules/testing.md: TDD workflow for Go and Python
- rules/documentation.md: Auto-documentation guidelines
- plans/embedding-service-separation.md: Migration plan
- settings.json: Post-edit hooks for docs/tests validation
- .gitignore: Exclude settings.local.json (contains API keys)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 23:41:29 -08:00
BreakPilot Dev
660295e218 fix(admin-v2): Restore complete admin-v2 application
The admin-v2 application was incomplete in the repository. This commit
restores all missing components:

- Admin pages (76 pages): dashboard, ai, compliance, dsgvo, education,
  infrastructure, communication, development, onboarding, rbac
- SDK pages (45 pages): tom, dsfa, vvt, loeschfristen, einwilligungen,
  vendor-compliance, tom-generator, dsr, and more
- Developer portal (25 pages): API docs, SDK guides, frameworks
- All components, lib files, hooks, and types
- Updated package.json with all dependencies

The issue was caused by incomplete initial repository state - the full
admin-v2 codebase existed in backend/admin-v2 and docs-src/admin-v2
but was never fully synced to the main admin-v2 directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 23:40:15 -08:00
BreakPilot Dev
f28244753f feat(claude): Add comprehensive project context and development rules
- CLAUDE.md: Complete project context with SSH connection, 49 services,
  all URLs (including SDK modules), tech stack, and core principles
- open-source-policy.md: License whitelist, SBOM workflow, dependency checks
- compliance-checklist.md: DSGVO/AI Act checklists, 5-question quick check
- debug-framework.md: 6-phase systematic debugging with Breakpilot-specific commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 23:38:37 -08:00