Some checks failed
CI / test (pull_request) Has been cancelled
- testing.md: 54 tests/4 files → 551 tests/25 files 반영, 전체 테스트 파일 설명 - architecture.md: v2 컴포넌트 추가 (Strategy, Context, Dashboard, Decision Logger 등), Playbook Mode 데이터 플로우, DB 스키마 5개 테이블, v2 환경변수 - commands.md: Dashboard 실행, Telegram 명령어 9종 레퍼런스 - CLAUDE.md: Project Structure 확장, 테스트 수 업데이트, --dashboard 플래그 - skills.md: DB 파일명 trades.db로 통일, Dashboard 명령어 추가 - requirements-log.md: 2026-02-16 문서 v2 동기화 요구사항 기록 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
The Ouroboros - Available Skills & Tools
Development Tools
Run Tests
pytest -v --cov=src --cov-report=term-missing
Run the full test suite with coverage reporting. Must pass before any merge.
Run Specific Test Module
pytest tests/test_risk.py -v
pytest tests/test_broker.py -v
pytest tests/test_brain.py -v
Type Checking
python -m mypy src/ --strict
Linting
ruff check src/ tests/
ruff format src/ tests/
Operational Tools
Start Trading Agent (Development)
python -m src.main --mode=paper
Runs the agent in paper-trading mode (no real orders).
Start Trading Agent with Dashboard
python -m src.main --mode=paper --dashboard
Runs the agent with FastAPI dashboard on 127.0.0.1:8080 (configurable via DASHBOARD_HOST/DASHBOARD_PORT).
Start Trading Agent (Production)
docker compose up -d ouroboros
Runs the full system via Docker Compose with all safety checks enabled.
View Logs
docker compose logs -f ouroboros
Stream JSON-formatted structured logs.
Run Backtester
python -m src.evolution.optimizer --backtest --days=30
Analyze the last 30 days of trade logs and generate performance metrics.
Evolution Tools
Generate New Strategy
python -m src.evolution.optimizer --evolve
Triggers the evolution engine to:
- Analyze
trades.dbfor failing patterns - Ask Gemini to generate a new strategy
- Run tests on the new strategy
- Create a PR if tests pass
Validate Strategy
pytest tests/ -k "strategy" -v
Run only strategy-related tests to validate a new strategy file.
Deployment Tools
Build Docker Image
docker build -t ouroboros:latest .
Deploy with Docker Compose
docker compose up -d
Health Check
curl http://localhost:8080/health
Database Tools
View Trade Logs
sqlite3 data/trades.db "SELECT * FROM trades ORDER BY timestamp DESC LIMIT 20;"
Export Trade History
sqlite3 -header -csv data/trades.db "SELECT * FROM trades;" > trades_export.csv
Safety Checklist (Pre-Deploy)
pytest -v --cov=srcpasses with >= 80% coverageruff check src/ tests/reports no errors.envfile contains valid KIS and Gemini API keys- Circuit breaker threshold is set to -3.0% or stricter
- Rate limiter is configured for KIS API limits
- Docker health check endpoint responds 200