docs: CLAUDE.md — Architektur-Invarianten und Deploy-Referenz

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 06:16:39 +00:00
parent 29846e82a7
commit b272b07044

18
CLAUDE.md Normal file
View File

@@ -0,0 +1,18 @@
# trade-kuns
Multi-Pair-Trendfolge-Paper-Bot (BTC/ETH/SOL/XRP_USDT): Donchian-20-Breakout auf 4h, EMA-200 + ADX-20-Filter, Chandelier-Trailing-Stop (3×ATR), long-only, fixe Parameter. **Paper-only — keine Order-Ausführung.**
## Stack & Befehle
- Bun 1.3 + TypeScript, Drizzle (Postgres), Zod. Tests collocated (`*.test.ts`).
- `bun test` · `bun run start` (Migration + Server) · `bun run backfill` · `bun run walkforward --fixed` · `bun run db:generate` / `db:migrate`
- Env: `DATABASE_URL` (lokal: `localhost:54320/tradekuns`, siehe `.env`), `PORT` (default 8080)
## Architektur
- **Ein Code-Pfad:** `live/process-cycle.ts` (Live) und `backtest/runner.ts` (Backtest) nutzen dieselben puren Funktionen (`strategy/`, `engine/`, `indicators/`) mit identischer Semantik — Paritätstest in `process-cycle.test.ts` erzwingt das. Änderungen an Entry/Exit/Sizing immer in den geteilten Modulen, nie in Runner oder Live-Loop einzeln.
- Live-State lebt in der DB (`bot_state.cursor_ts` = letzte verarbeitete 15m-Candle); der 5-min-Loop ist cursor-idempotent, Restart-Recovery gratis.
- Specs: `docs/specs/` · Walk-Forward-Ergebnisse: `docs/walkforward-ergebnisse-2026-06-09.md` (Gate nicht bestanden → bewusster Paper-Probelauf, User-Entscheidung 2026-06-10)
## Deployment
- **https://trading.kuns.dev** · Coolify-App-UUID `j7xbvfezctcxmeuon6gh6v5z` · Port 8080
- Redeploy: `redeploy j7xbvfezctcxmeuon6gh6v5z "msg"`
- DB im Container: `l8kogcggsc80sgcgk8kswww4:5432` (shared-postgres über Coolify-Netz; `connect_to_docker_network=true`)