Backend: - Audit-Log: Search-Endpoint mit ILIKE-Filter (actor/action/subject/date) - NTP: /ntp/status via chronyc tracking (Stratum, Offset, Quelle) - System: /service-restart mit Allowlist (haproxy/squid/unbound/chrony/scheduler) - Domain-Response-Headers + Rate-Limit (Migration 0024) - Join-Tokens (Migration 0025), Cluster-mTLS, Aggregator-Fan-Out - apt-Service für Update-Banner (apt-get update + Versionsprüfung) - Backup-Retry mit exponential backoff (retry_apt 3×) - publish.sh fail-fast + cleanup-old.sh (max 10 Versionen) Frontend: - Audit-Log-Page (/audit) mit Filter + Pagination - ErrorBoundary an React-Root + Vite build-target festgenagelt (iOS 15+) - Storage-Schema-Stamp: auto-wipe bei Versions-Mismatch (blank-page-Fix) - EmptyState-Komponente überall ausgerollt - SSL: Aggregate-Karte (total/expiring/expired/errors) - Backups: Aggregate-Karte (letzter Backup/Größe/Fehlschläge 24h) + Backup-Now - NTP: Sync-Status-Karte (chronyc tracking live) - Domains: Backend-UP/DOWN-Chip aus HAProxy-Stats - Backends: HAProxy-Status-Spalte (UP/DEGRADED/DOWN) - Settings: Service-Neustart-Karte (haproxy/squid/unbound/chrony/scheduler) - Settings: Upgrade-Status-Card, Wartungsmodus, Auto-Update, Retention - Dashboard: Recent-Alerts, Cluster-Health, License-Chip, Onboarding-Hint - System-Regeln im Firewall als eigener Tab Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
103 lines
4.2 KiB
Markdown
103 lines
4.2 KiB
Markdown
# agent.md — EdgeGuard Native: Agent-Factory Pipeline
|
|
|
|
> Dieses Dokument beschreibt wie das Projekt über den Architect Center Orchestrator mit spezialisierten Agenten aufgebaut wird. Jeder Agent hat einen klar abgegrenzten Scope und kann parallel zu anderen arbeiten.
|
|
|
|
---
|
|
|
|
## Idee
|
|
|
|
Der Architect Center Orchestrator dispatcht mehrere Claude Code Agenten, jeder spezialisiert auf eine Schicht des Projekts. Alle Agenten haben Zugriff auf:
|
|
- **RAG (Qdrant):** Code-Index von mail-gateway (project_id=6) und netcell-webpanel (project_id=5) als Referenz
|
|
- **MCP-Server `architect`:** ac_recall, ac_search_code, ac_search_code_global, ac_remember, ac_create_bug, ac_create_feature, ac_create_task, ac_update_task, ac_add_decision, ac_notify, ac_get_project, ac_research, ac_review, ac_analyze
|
|
- **Session:** eigene tmux-Session pro Agent (EdgeGuardNative-1 … N)
|
|
|
|
---
|
|
|
|
## Agent-Rollen
|
|
|
|
| Agent | Scope | Referenz-Projekt |
|
|
|-------|-------|-----------------|
|
|
| **DB-Architect** | Datenbankschema, goose-Migrations, GORM-Models | mail-gateway models/ |
|
|
| **API-Engineer** | Gin-Router, alle Handler, Middleware (Auth/JWT/RBAC) | mail-gateway handlers/ |
|
|
| **Config-Generator** | HAProxy, Squid, WireGuard, Unbound, nftables Templates + Renderer | mail-gateway config/ |
|
|
| **Cluster-Engineer** | KeyDB AA, PG Streaming Replication, Join/Promote, Write-Proxy | mail-gateway cluster/ |
|
|
| **Scheduler-Engineer** | ACME-Renewal, Backup, Health-Aggregation, License-Heartbeat | mail-gateway scheduler |
|
|
| **CLI-Engineer** | edgeguard-ctl: initdb, migrate, cluster-join, promote, dump-config | mail-gateway cmd/nmg-ctl/ |
|
|
| **Frontend-Engineer** | React 19 + AntD 6 UI (1:1 enconf-Pattern), alle Seiten v1 | netcell-webpanel management-ui/ |
|
|
| **Packaging-Engineer** | .deb-Pakete (dpkg-deb), postinst, systemd-Units, APT-Repo | mail-gateway packaging/ |
|
|
| **Bootstrap-Engineer** | install.sh Onliner, Cluster-Join-Script | netcell-webpanel install.sh |
|
|
|
|
---
|
|
|
|
## Abhängigkeiten (Build-Order)
|
|
|
|
```
|
|
Phase 1 (parallel):
|
|
DB-Architect → migrations/ + internal/models/
|
|
Packaging-Engineer → packaging/debian/ + deploy/systemd/
|
|
|
|
Phase 2 (parallel, braucht Phase 1):
|
|
API-Engineer → internal/handlers/ + cmd/edgeguard-api/
|
|
Config-Generator → internal/{haproxy,squid,wireguard,unbound,firewall}/
|
|
CLI-Engineer → internal/services/ + cmd/edgeguard-ctl/
|
|
|
|
Phase 3 (parallel, braucht Phase 2):
|
|
Cluster-Engineer → internal/{cluster,proxy,aggregator,license}/
|
|
Scheduler-Engineer → cmd/edgeguard-scheduler/
|
|
Frontend-Engineer → management-ui/
|
|
|
|
Phase 4 (braucht Phase 3):
|
|
Bootstrap-Engineer → scripts/install.sh, scripts/apt-repo/
|
|
Integration-Tests → make test + make deb
|
|
```
|
|
|
|
---
|
|
|
|
## Orchestrator-Prompt-Template
|
|
|
|
```
|
|
Du bist der <ROLE>-Agent für EdgeGuard Native (project_id=8, session=EdgeGuardNative-<N>).
|
|
|
|
Deine Aufgabe: <SCOPE>
|
|
|
|
Pflicht vor jeder Implementierung:
|
|
1. ac_search_code(query="<keywords>", project_id=<REF_ID>, limit=6) — Pattern aus Referenz lesen
|
|
2. Erst dann implementieren, NIEMALS raten
|
|
|
|
Referenz-Projekte: mail-gateway (id=6) für Backend-Patterns, netcell-webpanel (id=5) für UI/Bootstrap.
|
|
|
|
Arbeite in /var/www/edgeguard-native/<deinem Scope>.
|
|
Nach jedem Abschnitt: make test (Backend) oder npx tsc --noEmit (Frontend).
|
|
```
|
|
|
|
---
|
|
|
|
## RAG-Collections (Qdrant auf Architect Center Server)
|
|
|
|
| Collection | Inhalt | Wird genutzt von |
|
|
|-----------|--------|-----------------|
|
|
| `project_mail_gateway` | mail-gateway Code-Index | DB-, API-, Config-, Cluster-, Scheduler-, CLI-Agent |
|
|
| `project_netcell_webpanel` | netcell-webpanel Code-Index | Frontend-, Bootstrap-Agent |
|
|
| `project_edgeguard_native` | edgeguard-native eigener Index (live, wird gefüllt) | alle Agenten ab Phase 2 |
|
|
|
|
**Code-Indexer starten:**
|
|
```bash
|
|
# Auf Architect Center Server
|
|
python3 /var/www/architect-center/scripts/code_indexer.py --project-id 8
|
|
```
|
|
|
|
---
|
|
|
|
## Start-Befehl (via Architect Center Orchestrator)
|
|
|
|
1. Architect Center UI → Orchestrator → Neue Pipeline
|
|
2. Template: `edgeguard-native-v1`
|
|
3. Phase 1 starten → bei Completion Phase 2, etc.
|
|
|
|
Oder manuell per Session:
|
|
```bash
|
|
tmux new-session -d -s EdgeGuardNative-2 -c /var/www/edgeguard-native
|
|
# Claude Code in Session starten:
|
|
tmux send-keys -t EdgeGuardNative-2 'ARCHITECT_SESSION=EdgeGuardNative-2 ARCHITECT_PROJECT_ID=8 claude' Enter
|
|
```
|