docs: bootstrap tg-bot-jetson — board, ADRs, state, session-prompts
ROADMAP mit 7 Items (F-01…F-07) und DAG. STATE aktiviert. CONVENTIONS projektspezifisch ergänzt. ADRs 0002-0004 (Stack, Whitelist, Spike-Gate). Kaltstartfähige Prompts für F-01 (Skeleton) und F-02 (API-Spike) erzeugt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
67
session-prompts/F-01-skeleton.md
Normal file
67
session-prompts/F-01-skeleton.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Session-Prompt F-01 — Projekt-Skeleton
|
||||
|
||||
```
|
||||
Modell: Sonnet
|
||||
|
||||
Du arbeitest in /Users/tarikmoussa/Desktop/files/agent-swarm-repo auf einem neuen Branch
|
||||
`feat/skeleton` (von `main`).
|
||||
|
||||
## Aufgabe
|
||||
Lege das Python-Projekt-Skeleton für den Telegram-Bot an:
|
||||
pyproject.toml, Paketstruktur unter `src/bot/`, leere Test-Dateien unter `tests/`,
|
||||
.env.example und .gitignore. Kein Feature-Code — nur die Projektstruktur,
|
||||
sodass `uv run pytest tests/ -v` mit 0 Tests grün durchläuft.
|
||||
|
||||
Scope: NUR Datei- und Konfigurationsstruktur. Kein Bot-Code, kein HTTP-Code.
|
||||
|
||||
## Details
|
||||
Entscheidungen: `docs/adr/0002-python-telegram-bot-framework.md`
|
||||
Konventionen: `CONVENTIONS.md` (Abschnitt "Projekt: tg-bot-jetson")
|
||||
|
||||
Gewünschte Verzeichnisstruktur:
|
||||
```
|
||||
src/
|
||||
bot/
|
||||
__init__.py
|
||||
config.py # pydantic-settings: BOT_TOKEN, ALLOWED_USER_IDS, MODEL_BASE_URL
|
||||
handlers.py # vorerst leer (Platzhalter)
|
||||
whitelist.py # vorerst leer (Platzhalter)
|
||||
connector.py # vorerst leer (Platzhalter)
|
||||
main.py # Einstiegspunkt (vorerst nur "pass")
|
||||
tests/
|
||||
__init__.py
|
||||
test_config.py # vorerst leer
|
||||
pyproject.toml # [project] name="tg-bot-jetson", requires-python=">=3.11"
|
||||
# deps: python-telegram-bot>=21, httpx, pydantic-settings
|
||||
# [dev-deps]: pytest, ruff
|
||||
.env.example # BOT_TOKEN=<dein-bot-token>, ALLOWED_USER_IDS=123456,789012
|
||||
# MODEL_BASE_URL=http://192.168.x.x:11434
|
||||
.gitignore # .env, __pycache__, .venv, uv.lock nicht (committen!)
|
||||
uv.lock # nach `uv sync` erzeugt und committen
|
||||
```
|
||||
|
||||
## Akzeptanzkriterien
|
||||
- [ ] `uv sync` läuft ohne Fehler.
|
||||
- [ ] `uv run pytest tests/ -v` läuft durch (0 Tests, kein Fehler).
|
||||
- [ ] `uv run ruff check src/ tests/` → 0 Befunde.
|
||||
- [ ] `src/bot/config.py` enthält eine Pydantic-Settings-Klasse mit BOT_TOKEN,
|
||||
ALLOWED_USER_IDS (list[int]), MODEL_BASE_URL.
|
||||
- [ ] `.env.example` vorhanden und aussagekräftig.
|
||||
- [ ] `.env` ist in `.gitignore`.
|
||||
|
||||
## Nicht anfassen
|
||||
Alles außer den oben genannten Pfaden. Kein Telegram-Handler-Code,
|
||||
kein HTTP-Client-Code, keine Whitelist-Logik.
|
||||
|
||||
## Commit & Push
|
||||
- Conventional Commit: `chore: scaffold tg-bot-jetson project skeleton`
|
||||
- Trailer: `Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>`
|
||||
- Push nach `origin feat/skeleton`, PR öffnen (Base: `main`).
|
||||
|
||||
## Abschluss
|
||||
1. Manifest-Eintrag updaten: `manifests/requirements.md` → R-0001, Status `done`.
|
||||
2. `STATE.md` aktualisieren: F-01 → In Progress → nach Merge: Next F-03 + F-04 frei.
|
||||
3. Session-Log schreiben: `sessions/TEMPLATE.md` → `sessions/F-01-<datum>.md`.
|
||||
4. Hygiene-Gate: `bash scripts/gate-session-hygiene.sh`.
|
||||
5. PR-URL + Test-Zählstand reporten.
|
||||
```
|
||||
69
session-prompts/F-02-api-spike.md
Normal file
69
session-prompts/F-02-api-spike.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Session-Prompt F-02 — Spike: Modell-API-Format (Theorist + Prototyper)
|
||||
|
||||
```
|
||||
Modell: Opus
|
||||
|
||||
Du arbeitest in /Users/tarikmoussa/Desktop/files/agent-swarm-repo auf einem neuen Branch
|
||||
`spike/model-api` (von `main`).
|
||||
|
||||
WICHTIG: Dies ist ein Research-Spike. Der Branch ist Wegwerf. Kein Produktionscode.
|
||||
Spike-Gate-Regeln: `docs/loops/spike-gate.md`
|
||||
ADR: `docs/adr/0004-modell-api-spike-first.md`
|
||||
|
||||
## Aufgabe
|
||||
Bestimme das API-Format des selbst gehosteten Sprachmodells auf dem Jetson Orin Nano Super
|
||||
und produziere eine Mini-Spec (`spike/model-api/spec.md`), gegen die F-05 dann portiert.
|
||||
|
||||
Hintergrund: Das Modell läuft auf einem lokalen Server. Der wahrscheinlichste
|
||||
Backend-Stack ist **Ollama** (exponiert eine OpenAI-kompatible API auf Port 11434)
|
||||
oder **llama.cpp HTTP-Server** (Port 8080, eigenes Format). Wir wissen es nicht sicher.
|
||||
|
||||
## Phase 1 — Theorist (du selbst, Opus)
|
||||
1. Liste die drei wahrscheinlichsten Backend-Optionen für Jetson Orin:
|
||||
- Ollama (`/api/generate`, `/api/chat` oder OpenAI-compat `/v1/chat/completions`)
|
||||
- llama.cpp HTTP (`/completion`)
|
||||
- Custom FastAPI
|
||||
2. Für jede Option: notiere das minimale Request-/Response-Schema (JSON).
|
||||
3. Schreibe `spike/model-api/spec.md` mit den Schema-Varianten und dem
|
||||
GO-Kriterium: "Antwort ist nicht-leer und unter 30 s".
|
||||
|
||||
## Phase 2 — Prototyper (du selbst, Opus)
|
||||
Schreibe `spike/model-api/probe.py` — ein minimales, wegwerfbares Python-Skript:
|
||||
- Liest MODEL_BASE_URL aus Env-Var (default: http://localhost:11434).
|
||||
- Schickt eine kurze Test-Nachricht ("Hallo, antworte mit einem Wort.").
|
||||
- Gibt die rohe JSON-Antwort aus.
|
||||
- Kommentiert, welches Schema es probiert hat.
|
||||
|
||||
Das Skript ist **kein Produktionscode** — kein Error-Handling, keine Abstraktionen.
|
||||
|
||||
## Phase 3 — GO/NO-GO
|
||||
Dokumentiere in `spike/model-api/result.md`:
|
||||
- Welches Backend hast du vorgefunden (oder angenommen)?
|
||||
- Funktioniert der Probe erfolgreich? (GO / NO-GO)
|
||||
- Exaktes API-Schema für den Connector (Request + Response-Felder).
|
||||
- Empfehlung für F-05 Porter (welche Library, welchen Endpoint).
|
||||
|
||||
## Akzeptanzkriterien
|
||||
- [ ] `spike/model-api/spec.md` enthält ≥ 2 Schema-Varianten mit JSON-Beispielen.
|
||||
- [ ] `spike/model-api/probe.py` läuft ohne Import-Fehler (`python spike/model-api/probe.py --help` o. ä.).
|
||||
- [ ] `spike/model-api/result.md` enthält ein klares GO oder NO-GO mit Begründung.
|
||||
- [ ] GO: Das finale API-Schema ist in `result.md` exakt spezifiziert (Felder, Typen, Endpoint-Pfad).
|
||||
- [ ] NO-GO: Ursache dokumentiert + Human-Empfehlung, welches Backend aufzusetzen.
|
||||
|
||||
## Nicht anfassen
|
||||
`src/`, `tests/`, `pyproject.toml`, `ROADMAP.md`, `STATE.md` — alles außer `spike/model-api/`.
|
||||
Kein Produktionscode schreiben. Spike-Branch wird nach GO verworfen.
|
||||
|
||||
## Commit & Push
|
||||
- Conventional Commit: `docs: spike model-api format discovery [GO/NO-GO]`
|
||||
- Trailer: `Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>`
|
||||
- Push nach `origin spike/model-api`.
|
||||
- Kein PR — Leader entscheidet nach GO/NO-GO über nächsten Schritt.
|
||||
|
||||
## Abschluss
|
||||
1. `STATE.md` aktualisieren: F-02 Spike-Ergebnis + GO/NO-GO eintragen.
|
||||
2. Falls GO: Leader dispatcht F-05 (Porter · Sonnet) mit `result.md` als Spec.
|
||||
Falls NO-GO: Leader markiert F-05 als ⛔ blocked-extern + Human-Eskalation.
|
||||
3. Session-Log: `sessions/F-02-<datum>.md`.
|
||||
4. Hygiene-Gate: `bash scripts/gate-session-hygiene.sh`.
|
||||
```
|
||||
Reference in New Issue
Block a user