feat: bootstrap jetson-ai-ollama from agent-swarm template
Some checks failed
gates / quality (push) Has been cancelled

Leader-Bootstrap (Planung) aus Template + Jetson-Meta-Prompt:
- ROADMAP-Board W1-W6 als Abhaengigkeits-DAG (Ready-Set = {W1})
- STATE mit disjunkter Datei-Ownership W2-W6
- CONVENTIONS Projekt-Vertrag (Profile, Pfade, Ports, Daemon-Env, num_ctx, DVC, Scope)
- manifests/requirements.md = kalt verifizierbares Review-Manifest (R-01..R-10)
- REVIEW.md Kalt-Review-Einstieg; ADR 0002 (Ollama-nativ, kein Swapper/Gateway)
- session-prompts/W1..W6 dispatch-fertig; .gitignore um Jetson-Ignores erweitert
- examples/walkthrough entfernt (Projekt hat eigenes gefuelltes Board)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 06:55:39 +02:00
commit efee259d01
43 changed files with 1563 additions and 0 deletions

39
session-prompts/W3.md Normal file
View File

@@ -0,0 +1,39 @@
# Session-Prompt — W3 Exporter-Sidecar (parallel, nach W1)
```
Modell: Sonnet
Du bist WORKER für Paket W3 in /pfad/zu/jetson-ai-ollama, Branch `feat/w3-exporter`
(von `main`, nach W1-Merge). Lies AGENTS.md → STATE.md → CONVENTIONS.md.
## Aufgabe
Ollama hat keinen Prometheus-Endpoint. Bau einen schlanken Exporter-Sidecar, der die
Ollama-API anzapft und `/metrics` auf Port 8000 exponiert — als systemd-Service.
## Deliverables (Ownership: `exporter/`, `requirements/exporter.txt`)
- `exporter/` — Exporter (Python). Quellen: Timing-Felder jeder Ollama-Antwort
(`eval_count`, `eval_duration`, `prompt_eval_duration`, `total_duration`) und
`/api/ps` (Modell, VRAM, Keep-Alive); optional `tegrastats`. Endpoint `:8000/metrics`.
Alternativ einen fertigen Exporter (z. B. `ghcr.io/norskhelsenett/ollama-metrics`)
als systemd-Unit verdrahten — dann ist `exporter/` dünn.
- `exporter/systemd/ollama-exporter.service` — systemd-Unit (After=ollama.service).
- `requirements/exporter.txt` — Laufzeit-Deps des Exporters.
## Akzeptanzkriterien
- [ ] `pytest tests/test_endpoints.py` deckt den `/metrics`-Smoke ab (W5 liefert den
Test; bis dahin lokal: Exporter startet, `curl :8000/metrics` liefert Prom-Format). (R-06)
- [ ] systemd-Unit ist syntaktisch valide und referenziert Port 8000.
- [ ] Liest NUR die Ollama-API/`/api/ps` — keine Modell-/Profil-Logik (das ist W2).
## Nicht anfassen
`ollama/`, `client/`, `scripts/`, `.github/`, `docs/`, `tests/`. Nur deine Pfade.
(Den `tests/test_endpoints.py` schreibt W5 — koordiniere die Endpoint-Form über CONVENTIONS.)
## Abschluss
1. `manifests/requirements.md`: R-06 → `done`.
2. `STATE.md` + Session-Log.
3. Commit `feat(w3): ollama metrics exporter sidecar` + Trailer
`Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>`.
4. `bash scripts/gate-session-hygiene.sh && bash scripts/gate-ownership.sh`.
5. PR (Base `main`). Dann Review-Gate (Opus).
```