Files
leocrm/quality-gate-phase2.md
T
leocrm-bot 6520e88d53 phase2: architecture, task_graph v2.1.0, AGENTS.md, quality gates, security review
- architecture.md (2019 lines): 73/73 v1 features, RLS policies, CORS, auth rate limiting, v2 FKs removed
- task_graph.json v2.1.0: 14 tasks (7 v1 + 7 v2), 143 features, 298 ACs, all dict test_specs
- AGENTS.md: 14 tasks mapped, T07a/T07b split, v1/v2 phase plan
- Quality gate reviews: Round 1, 2, 3 (all passed)
- Security review: APPROVED_WITH_CONCERNS (0 critical, 7 major, 8 minor)
- Architecture feasibility review: FEASIBLE_WITH_RISKS (3 critical fixed, 5 major fixed)
- All 3 critical issues from feasibility review resolved
- All pre-implementation security items addressed
2026-06-29 08:02:14 +02:00

384 lines
21 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LeoCRM — Quality Gate Phase 2 (Architecture) Review
**Reviewer:** Quality Reviewer (Agent Zero)
**Datum:** 2026-06-28
**Phase:** Phase 2 — Architecture + Task Graph + AGENTS.md
**Verdict:****BLOCKED** — 3 Critical Issues, 5 Major Issues
---
## Prüfkriterien-Übersicht
| # | Kriterium | Ergebnis | Severity |
|---|----------|----------|----------|
| 1 | Architecture.md deckt alle 10 Bereiche ab | ✅ PASS | — |
| 2 | Task Graph: 6-8 substantielle Tasks | ✅ PASS | — |
| 3 | 143/143 Features abgedeckt | ❌ **FAIL** | CRITICAL |
| 4 | AGENTS.md: Commands, Forbidden Patterns, Task-Zuweisung | ✅ PASS | — |
| 5 | Keine Widersprüche arch.md ↔ requirements.md | ⚠️ PARTIAL | MAJOR |
| 6 | Keine Widersprüche task_graph.json ↔ arch.md | ⚠️ PARTIAL | MINOR |
| 7 | Multi-Tenant (tenant_id) konsistent | ✅ PASS | — |
| 8 | Plugin-System als v1-Core-Feature | ✅ PASS | — |
| 9 | PostgreSQL 16, React 18 SPA, FastAPI | ✅ PASS | — |
| 10 | Session-based Auth + API-Token separat | ⚠️ PARTIAL | CRITICAL |
**Gesamt:** 6 PASS, 2 PARTIAL, 1 FAIL, 1 CRITICAL PARTIAL → **BLOCKED**
---
## Detaillierte Befunde
### ✅ Kriterium 1: Architecture.md — 10 Bereiche (PASS)
Alle 10 Bereiche sind vorhanden und substantiell ausgearbeitet:
| Bereich | Section | Zeilen | Status |
|---------|---------|--------|-------|
| System Architecture | §1 | 1-131 | ✅ Vollständig (Diagramm, Services, Backend/Frontend Struktur) |
| DB Schema | §2 | 134-725 | ✅ Vollständig (Core + Plugin Tables, FTS) |
| API Design | §3 | 728-967 | ✅ Vollständig (alle Endpoints mit Feature-IDs) |
| Plugin Architecture | §4 | 970-1078 | ✅ Vollständig (Manifest, Lifecycle, Event Bus, DI, UI Framework) |
| Multi-Tenant | §5 | 1081-1106 | ✅ Vollständig (Session Context, ORM Auto-Filter, TenantMixin) |
| Auth | §6 | 1108-1171 | ✅ Vollständig (Session, RBAC, API Tokens, CSRF, Password Reset) |
| Frontend | §7 | 1174-1244 | ✅ Vollständig (Stack, Routing, State, i18n, A11Y, Design System) |
| Deployment | §8 | 1247-1343 | ✅ Vollständig (Docker Compose, .env, Backup) |
| Test Strategy | §9 | 1345-1386 | ✅ Vollständig (Backend, Frontend, E2E) |
| ADRs | §10 | 1389-1450 | ✅ Vollständig (6 ADRs mit Context/Decision/Rationale/Alternatives) |
---
### ✅ Kriterium 2: Task Graph — 8 substantielle Tasks (PASS)
| Task | Titel | Est. Lines | Dependencies | Test Spec | Acceptance Criteria |
|------|-------|------------|--------------|------------|---------------------|
| T01 | Core Infrastructure + Multi-Tenant + Auth | 500 | — | ✅ 3 commands | ✅ 25 criteria |
| T02 | Company + Contact + Import/Export | 600 | T01 | ✅ 3 commands | ✅ 24 criteria |
| T03 | Plugin System Framework | 500 | T01 | ✅ 3 commands | ✅ 14 criteria |
| T04 | DMS Plugin + Tags Plugin | 700 | T01, T03 | ✅ 4 commands | ✅ 32 criteria |
| T05 | Calendar Plugin | 700 | T01, T03 | ✅ 3 commands | ✅ 29 criteria |
| T06 | Mail Plugin | 800 | T01, T03 | ✅ 3 commands | ✅ 27 criteria |
| T07 | Frontend Core SPA | 600 | T01, T02 | ✅ 4 commands | ✅ 31 criteria |
| T08 | Frontend Plugins + Search + Deployment | 700 | T03-T07 | ✅ 6 commands | ✅ 42 criteria |
- Alle Tasks im 200-800 Zeilen-Bereich ✅
- Jeder Task hat test_spec mit commands, test_files, coverage_target ✅
- Jeder Task hat substantielle acceptance_criteria ✅
- 5-Phasen-Execution-Plan mit Parallelisierung ✅
- Keine Micro-Tasks ✅
---
### ❌ Kriterium 3: Feature Coverage 143/143 (FAIL — CRITICAL)
**Cross-Check-Ergebnis (programmatisch durchgeführt):**
- **Requirements.md:** 143 eindeutige Feature-IDs
- **Task Graph:** 114 eindeutige Feature-IDs in requirement_ids arrays
- **Fehlend:** 30 Features in requirements.md aber NICHT in task_graph.json
- **Phantom:** 1 Feature in task_graph.json aber NICHT in requirements.md (F-CONT-08)
#### Klassifikation der 30 fehlenden Features:
**Kategorie A: v2-Scope (6 Features — legitimerweise ausgeschlossen)**
| Feature | Beschreibung | Tag |
|---------|-------------|-----|
| F-FILE-01 | Datei-Explorer | [v2-Plugin] |
| F-FILE-02 | Datei-Sharing | [v2-Plugin] |
| F-FILE-03 | PDF-Preview | [v2-Plugin] |
| F-FILE-04 | OnlyOffice-Integration | [v2-Plugin] |
| F-FILEUI-05 | Upload-Progress-Anzeige | [v2-Plugin] |
| F-FILEUI-06 | Drag & Drop zwischen Ordnern | [v2-Plugin] |
→ Diese 6 Features sind als [v2-Plugin] markiert und korrekterweise nicht in v1-Tasks enthalten. Funktionalität ist teilweise durch F-DMS-XX und F-FILEUI-01-04 abgedeckt.
**Kategorie B: Implizit abgedeckt, aber Feature-ID fehlt in task_graph (19 Features — Traceability-Gap)**
| Feature | Beschreibung | Implizit gedeckt durch | Severity |
|---------|-------------|----------------------|----------|
| F-DATA-03 | Daten-Validierung | Pydantic schemas in allen Tasks | MAJOR |
| F-DATA-04 | PostgreSQL als Datenbank | ADR-01, gesamte DB Schema | MAJOR |
| F-DATA-06 | ARIA-Rollen auf DataTable | F-A11Y-01/02/03 in T07 | MAJOR |
| F-ENV-01 | Environments & Secrets | .env.example in Architecture §8 | MAJOR |
| F-INFRA-02 | Backup & Restore | Architecture §8 Backup section | MAJOR |
| F-INFRA-03 | Logging | LOG_LEVEL in .env.example | MAJOR |
| F-NAV-01 | Navigation Sidebar | T07 Layout Shell (Sidebar) | MAJOR |
| F-SCHED-01 | Background-Jobs | T01 ARQ Job Queue | MAJOR |
| F-SEC-02 | XSS-Schutz & Input-Sanitization | DOMPurify, Pydantic validation | MAJOR |
| F-SEC-03 | Session-Timeout | T01 Auth (8h timeout) | MAJOR |
| F-SET-01 | Einstellungen als Baum-Menü | T07 Settings Feature (SettingsTree) | MAJOR |
| F-TEST-01 | Testing-Strategie | Architecture §9 + AGENTS.md | MAJOR |
| F-UI-01 | Responsive Design | T07 Tailwind responsive breakpoints | MAJOR |
| F-UI-02 | Internationalisierung | T07 i18n setup (de/en) | MAJOR |
| F-UI-03 | Error-Handling & Toast | T07 Toast component | MAJOR |
| F-UI-04 | Loading-States | T07 Skeleton component | MAJOR |
| F-UI-05 | Empty-States | T07 EmptyState component | MAJOR |
| F-UI-06 | Confirmation-Dialogs | T07 ConfirmDialog | MAJOR |
| F-UI-08 | Datenansichten Tabelle/Karten/Liste | T07 TanStack Table | MAJOR |
→ Diese 19 Features sind funktional durch die Tasks abgedeckt, aber ihre Feature-IDs sind NICHT in den `requirement_ids` Arrays der Tasks gelistet. **Die Traceability ist broken.** Jede Anforderung muss explizit einem Task zugeordnet sein.
**Kategorie C: Völlig unabgedeckt — v1 Features ohne Task und ohne Architecture (5 Features — CRITICAL)**
| Feature | Beschreibung | Status | Severity |
|---------|-------------|--------|----------|
| **F-AI-01** | KI-Copilot mit voller API-Kontrolle [v1] | ❌ KEIN Task, KEINE Architecture | **CRITICAL** |
| **F-WF-01** | Hybrid-Workflow-Engine [v1] | ❌ KEIN Task, KEINE Architecture | **CRITICAL** |
| F-DOC-01 | Dokumentation [v1] | ❌ KEIN Task | MAJOR |
| F-INFRA-04 | Monitoring & Alerting [v1] | ❌ Nicht abgedeckt | MAJOR |
| F-PERF-01 | Performance [v1] | ❌ Nicht abgedeckt | MAJOR |
**Detailanalyse F-AI-01 (KI-Copilot):**
- Requirements sagen: "KI-Copilot von Anfang an einplanen" + "Architektur muss KI-Integration von vornherein unterstützen"
- Architecture.md erwähnt nur API-First-Design (F-CORE-06), aber hat KEINE Sektion für KI-Integration
- Task Graph hat keinen Task für KI-Copilot
- Der Copilot benötigt API-Zugriff mit RBAC-Respektierung — die API existiert, aber kein Task implementiert die Copilot-Integration
- **Erforderliche Aktion:** Architektur um KI-Integration-Sektion erweitern + Task für KI-Copilot API-Endpunkt hinzufügen (oder als Teil von T01/T02 als API-First-Design-Nachweis)
**Detailanalyse F-WF-01 (Hybrid-Workflow-Engine):**
- Requirements sagen: "Hybrid-Ansatz: Code-Engine für Kern-Workflows + konfigurierbare Workflow-Regeln"
- Architecture.md hat Event Bus, aber keine Workflow-Engine
- Task Graph hat keinen Task für Workflow-Engine
- **Erforderliche Aktion:** Architektur um Workflow-Engine-Sektion erweitern + Task hinzufügen (oder bestehenden Task erweitern)
#### Phantom Feature
| Feature | In task_graph | In requirements.md | Issue |
|---------|--------------|-------------------|-------|
| F-CONT-08 | ✅ T02 requirement_ids | ❌ Nicht vorhanden | Phantom — vermutlich GDPR-Delete für Contacts, das eigentlich F-COMP-08 ist (bereits gelistet) |
---
### ✅ Kriterium 4: AGENTS.md (PASS)
**Build/Test Commands:**
- Backend: venv setup, uvicorn, alembic, pytest, pytest-cov, mypy, ruff ✅
- Frontend: npm install, dev, build, vitest, tsc, eslint ✅
- Docker Compose: build, up, logs, down, config validate ✅
- E2E: Playwright install + test ✅
**Forbidden Patterns:**
- Backend: 14 Forbidden Patterns (SQLite, Jinja2, Cross-Tenant, Plaintext Passwords, JWT, Naive Datetime, Integer IDs, Hard-Delete ohne GDPR, Manual Tenant Filter, Sync I/O, Raw SQL, Secrets in Code, Unvalidated Input, Missing Audit Log, Plugin Tables ohne tenant_id) ✅
- Frontend: 10 Forbidden Patterns (Class Components, Inline Styles, Hardcoded Strings, Manual Fetch, Server Data in Zustand, `any` Types, Missing ARIA, Touch Targets <44px, Direct DOM, Unsafe HTML) ✅
- Deployment: 5 Forbidden Patterns (Root in Container, Exposed DB Port, No Health Check, No Volume, Secrets in compose) ✅
**Task-Zuweisung:**
- 5-Phasen-Plan mit Parallelisierung ✅
- Task-to-Subagent Mapping (alle implementation_engineer) ✅
- Block Rules (max 3 Tasks/Block, quality_reviewer nach Block) ✅
- Quality Gates (Per-Task, Phase, Release) ✅
---
### ⚠️ Kriterium 5: Widersprüche architecture.md ↔ requirements.md (PARTIAL — MAJOR)
**Keine direkten Widersprüche** in Technologie-Entscheidungen:
- PostgreSQL 16 ↔ F-DATA-04 ✓
- React 18 SPA ↔ Requirements ✓
- FastAPI Backend ↔ Requirements ✓
- Session-based Auth ↔ F-AUTH-01/F-INT-02 ✓
- Plugin System ↔ F-PLUGIN-01/02 ✓
**Aber: Gaps (Requirements fordern, Architecture schweigt):**
- F-AI-01 fordert KI-Integration → Architecture hat keine KI-Sektion (CRITICAL)
- F-WF-01 fordert Workflow-Engine → Architecture hat keine Workflow-Sektion (CRITICAL)
- F-SEC-02 fordert CSP-Header → Architecture erwähnt keinen CSP-Header (MINOR)
- F-INFRA-04 fordert Monitoring & Alerting → Architecture hat keins (MAJOR)
- F-PERF-01 fordert Performance-Requirements → Architecture hat keine Performance-Sektion (MAJOR)
---
### ⚠️ Kriterium 6: Widersprüche task_graph.json ↔ architecture.md (PARTIAL — MINOR)
- Task-API-Endpoints ↔ Architecture API Design: Konsistent ✅
- Task-DB-Models ↔ Architecture DB Schema: Konsistent ✅
- Task-Plugin-Architecture ↔ Architecture Plugin Section: Konsistent ✅
- Task-Dependencies ↔ Architecture Service Dependencies: Konsistent ✅
- **F-CONT-08** in T02 requirement_ids existiert nicht in requirements.md (Phantom) — MINOR
- `api_tokens` table in Architecture §6 erwähnt, aber nicht in DB Schema §2 — MINOR
---
### ✅ Kriterium 7: Multi-Tenant konsistent (PASS)
- DB Schema: Jede Tabelle hat `tenant_id UUID FK→tenants.id`
- Core: tenants, users, user_tenants, roles, sessions, companies, contacts, company_contacts, audit_log, deletion_log, notifications, password_reset_tokens, plugins ✅
- DMS: dms_folders, dms_files, file_links, folder_permissions, file_shares, share_links ✅
- Calendar: calendars, calendar_entries, calendar_entry_links, calendar_shares, user_calendar_visibility, subtasks, resources, resource_bookings ✅
- Mail: mail_accounts, mail_folders, mails, mail_attachments, mail_labels, mail_label_assignments, mail_rules, mail_templates, mail_signatures, vacation_sent_log, pgp_keys, contact_pgp_keys ✅
- Tags: tags, tag_assignments ✅
- Architecture §5: ORM Auto-Filter via `before_query` event listener ✅
- TenantMixin base class ✅
- Cross-Tenant Protection: 404 (not 403) ✅
- Plugin Tables MUST include tenant_id — migration validator enforces ✅
- AGENTS.md Forbidden: "Plugin Tables without tenant_id" ✅
- Task T01 acceptance criteria: "Cross-tenant access auf company → 404" ✅
---
### ✅ Kriterium 8: Plugin-System als v1-Core-Feature (PASS)
- Architecture §4: Vollständige Plugin-Architektur (Manifest, Lifecycle, Event Bus, DI, UI Framework) ✅
- ADR-03: Built-in plugins with manifest-driven registration ✅
- Task T03: Plugin System Framework (install/activate/deactivate/uninstall, migrations, UI registry) ✅
- Tasks T04-T06: Plugin-Implementierungen (DMS+Tags, Calendar, Mail) ✅
- Plugin Endpoints in API Design ✅
- AGENTS.md: Plugin structure in conventions ✅
- Nicht als Non-Goal markiert ✅
---
### ✅ Kriterium 9: PostgreSQL 16, React 18 SPA, FastAPI (PASS)
- Docker Compose: `postgres:16-alpine`
- Frontend Stack: React 18, Vite, React Router v6 ✅
- Backend: FastAPI + Uvicorn ✅
- ADR-01: PostgreSQL 16 instead of SQLite ✅
- AGENTS.md Forbidden: ❌ SQLite, ❌ Jinja2 ✅
- Keine SQLite-Referenzen in gesamter Architektur ✅
- Keine Jinja2-Referenzen in gesamter Architektur ✅
---
### ⚠️ Kriterium 10: Session-based Auth + API-Token separat (PARTIAL — CRITICAL)
**Session-based Auth:**
- Architecture §6: Session in `sessions` table, HttpOnly+Secure+SameSite=Strict cookie ✅
- ADR-05: Session-based Auth instead of JWT ✅
- AGENTS.md Forbidden: ❌ JWT Tokens ✅
- Password hashing: bcrypt cost=12 ✅
- CSRF: SameSite=Strict + Origin-Header-Validierung ✅
**⚠️ CRITICAL CONTRADICTION — Session Storage:**
- Architecture §6 (line 1116): "Create session in `sessions` table" → PostgreSQL
- ADR-05 (line 1437): "Server-side sessions in Redis" + "Session data in Redis for fast lookup"
- DB Schema (lines 193-200): `sessions` table definiert mit id, user_id, tenant_id, csrf_token, expires_at
- **Widerspruch:** Section 6 sagt PostgreSQL `sessions` table, ADR-05 sagt Redis. Es ist unklar, ob Sessions in Redis ODER PostgreSQL ODER beiden gespeichert werden.
- **Erforderliche Aktion:** Klären und konsistent dokumentieren: Redis für Session-Lookup (fast) + PostgreSQL für Persistenz (survival)? Oder nur PostgreSQL? ADR-05 muss mit Section 6 übereinstimmen.
**API Tokens:**
- Architecture §6 erwähnt `api_tokens` table (user_id, token_hash, name, scopes, expires_at) ✅
- Markiert als "post-MVP, but architecture supports it" ✅
- `api_tokens` table NICHT in DB Schema §2 definiert — MINOR
- Token auth via `Authorization: Bearer <token>`
- Token respektiert RBAC und tenant isolation ✅
---
## Severity Summary
| Severity | Count | Details |
|----------|-------|--------|
| **CRITICAL** | 3 | F-AI-01 fehlt, F-WF-01 fehlt, Session-Storage-Widerspruch |
| **MAJOR** | 5 | 19 Features ohne Traceability, F-DOC-01 fehlt, F-INFRA-04 fehlt, F-PERF-01 fehlt, F-CONT-08 Phantom |
| **MINOR** | 3 | api_tokens table nicht in DB Schema, CSP-Header nicht erwähnt, Architecture line 1033 typo (```n) |
| **SUGGESTION** | 1 | Feature-IDs der implizit abgedeckten Features zu task_graph hinzufügen |
---
## Findings (Strukturiert)
### CRITICAL-1: F-AI-01 (KI-Copilot) — V1 Feature komplett fehlt
- **Artifact:** architecture.md, task_graph.json
- **Location:** F-AI-01 in requirements.md ist [v1], aber kein Task und keine Architecture-Sektion
- **Issue:** Requirements fordern KI-Copilot mit API-Kontrolle und RBAC-Respektierung. Weder Architecture.md noch Task Graph enthalten einen Task oder eine Sektion dafür.
- **Recommendation:**
1. Architecture.md um Sektion "KI-Integration" erweitern: API-First-Design als Grundlage, KI-Copilot API-Endpoint (`/api/v1/ai/copilot`), RBAC-Durchsetzung via bestehende Middleware
2. Task Graph: Neuen Task T09 hinzufügen ODER T01/T02 erweitern um KI-Copilot API-Endpoint
3. F-AI-01 zu requirement_ids des entsprechenden Tasks hinzufügen
- **Block transition:** JA
### CRITICAL-2: F-WF-01 (Hybrid-Workflow-Engine) — V1 Feature komplett fehlt
- **Artifact:** architecture.md, task_graph.json
- **Location:** F-WF-01 in requirements.md ist [v1], aber kein Task und keine Architecture-Sektion
- **Issue:** Requirements fordern Hybrid-Workflow-Engine (Code-Engine + konfigurierbare Regeln). Architecture hat nur Event Bus, keine Workflow-Engine.
- **Recommendation:**
1. Architecture.md um Sektion "Workflow Engine" erweitern: Code-basierte Kern-Workflows + konfigurierbare User-Workflows
2. DB Schema: `workflows`, `workflow_steps`, `workflow_instances` Tabellen
3. Task Graph: Neuen Task hinzufügen ODER bestehenden Task erweitern
4. F-WF-01 zu requirement_ids hinzufügen
- **Block transition:** JA
### CRITICAL-3: Session-Storage-Widerspruch (PostgreSQL vs Redis)
- **Artifact:** architecture.md
- **Location:** Section 6 (line 1116) vs ADR-05 (line 1437)
- **Issue:** Section 6 sagt "Create session in `sessions` table" (PostgreSQL). ADR-05 sagt "Server-side sessions in Redis". DB Schema definiert `sessions` table. Unklar, wo Sessions gespeichert werden.
- **Recommendation:**
1. Entscheidung treffen: Redis für Session-Store (fast, mit TTL) ODER PostgreSQL `sessions` table (persistent) ODER beides (Redis für Lookup + PostgreSQL für Audit)
2. Architecture §6 und ADR-5 konsistent machen
3. Wenn Redis-only: `sessions` table aus DB Schema entfernen oder als Audit-Trail behalten
4. Wenn PostgreSQL-only: ADR-05 Rationale anpassen
- **Block transition:** JA
### MAJOR-1: 19 v1 Features ohne Traceability in task_graph
- **Artifact:** task_graph.json
- **Location:** requirement_ids arrays in allen Tasks
- **Issue:** 19 Features sind funktional durch Tasks abgedeckt, aber ihre IDs fehlen in den requirement_ids Arrays. Traceability ist broken.
- **Recommendation:** Füge folgende Feature-IDs zu den entsprechenden Tasks hinzu:
- T01: F-SCHED-01, F-SEC-02, F-SEC-03, F-INFRA-03
- T02: F-DATA-03, F-DATA-04
- T07: F-NAV-01, F-SET-01, F-UI-01, F-UI-02, F-UI-03, F-UI-04, F-UI-05, F-UI-06, F-UI-08, F-DATA-06
- T08: F-ENV-01, F-INFRA-02
- Alle Tasks / übergreifend: F-TEST-01
- **Block transition:** NEIN, aber vor Implementation beheben
### MAJOR-2: F-DOC-01 (Dokumentation) — V1 Feature ohne Task
- **Artifact:** task_graph.json
- **Issue:** F-DOC-01 fordert Dokumentation. Kein Task hat diesen Feature-ID. Architektur erwähnt `docs/admin-guide.md` aber kein Task erstellt Dokumentation.
- **Recommendation:** T08 um Dokumentations-Task erweitern oder separaten Mini-Task für Admin-Guide + API-Docs hinzufügen
### MAJOR-3: F-INFRA-04 (Monitoring & Alerting) — V1 Feature nicht abgedeckt
- **Artifact:** architecture.md, task_graph.json
- **Issue:** Requirements fordern Monitoring & Alerting. Architecture und Task Graph enthalten keins.
- **Recommendation:** Architecture §8 um Monitoring-Sektion erweitern (z.B. /health endpoint erweitert, Prometheus metrics, Alerting). Task T01 oder T08 um Monitoring erweitern.
### MAJOR-4: F-PERF-01 (Performance) — V1 Feature nicht abgedeckt
- **Artifact:** architecture.md, task_graph.json
- **Issue:** Requirements fordern Performance (200k Records, FTS, <2s Response). Architecture hat keine Performance-Sektion oder -Tests.
- **Recommendation:** Architecture um Performance-Sektion erweitern (DB Indexing Strategy, Query Optimization, Pagination Limits). Task T02 um Performance-Test erweitern (200k seed + list <2s).
### MAJOR-5: F-CONT-08 Phantom in task_graph.json
- **Artifact:** task_graph.json
- **Location:** T02 requirement_ids array
- **Issue:** F-CONT-08 existiert nicht in requirements.md. Vermutlich für GDPR-Delete von Contacts gedacht, was bereits durch F-COMP-08 abgedeckt ist.
- **Recommendation:** F-CONT-08 aus T02 requirement_ids entfernen. Funktionalität ist bereits durch F-COMP-08 abgedeckt.
### MINOR-1: api_tokens table nicht in DB Schema definiert
- **Artifact:** architecture.md
- **Location:** Section 6 erwähnt api_tokens table, aber Section 2 (DB Schema) definiert sie nicht
- **Recommendation:** api_tokens table in DB Schema aufnehmen (selbst wenn post-MVP)
### MINOR-2: CSP-Header nicht erwähnt
- **Artifact:** architecture.md
- **Location:** F-SEC-02 fordert CSP-Header, Architecture erwähnt keins
- **Recommendation:** Nginx config um Content-Security-Policy Header erweitern
### MINOR-3: Architecture line 1033 — Typo in code fence
- **Artifact:** architecture.md
- **Location:** Line 1033: ````n` statt ```` `
- **Recommendation:** `n` entfernen
---
## Next Steps (vor Phase-Übergang erforderlich)
1. **[CRITICAL]** Architecture.md um KI-Integration-Sektion erweitern (F-AI-01)
2. **[CRITICAL]** Architecture.md um Workflow-Engine-Sektion erweitern (F-WF-01) + entsprechende DB-Tabellen
3. **[CRITICAL]** Session-Storage-Widerspruch auflösen (Redis vs PostgreSQL) und Architecture §6 + ADR-05 konsistent machen
4. **[MAJOR]** 19 implizit abgedeckte Feature-IDs zu task_graph.json requirement_ids hinzufügen
5. **[MAJOR]** F-DOC-01, F-INFRA-04, F-PERF-01 Tasks oder Task-Erweiterungen definieren
6. **[MAJOR]** F-CONT-08 aus task_graph.json entfernen (Phantom)
7. **[MINOR]** api_tokens table in DB Schema aufnehmen
8. **[MINOR]** CSP-Header in Nginx config dokumentieren
9. **[MINOR]** Typo in architecture.md line 1033 korrigieren
10. **[SUGGESTION]** feature_coverage_summary in task_graph.json aktualisieren nach Hinzufügen der fehlenden IDs
---
## Review-Metadata
- **Files reviewed:** architecture.md (1468 lines), task_graph.json (480 lines), AGENTS.md (538 lines), requirements.md (2142 lines, Referenz)
- **Cross-check method:** Programmatische Feature-ID-Extraktion + Set-Differenz (Python regex)
- **Review duration:** Vollständige Lektüre aller 4 Dateien
- **Tool used:** text_editor (read), code_execution_tool (python cross-check)