feat: serena MCP 설정 추가
This commit is contained in:
40
.serena/memories/project_overview.md
Normal file
40
.serena/memories/project_overview.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Project Overview: executor
|
||||
|
||||
## Purpose
|
||||
A Django-based quantitative strategy executor. It provides an API for executing quantitative trading strategies (trend following, mean reversion, volatility breakout, asset allocation) and returning results, with optional callback support.
|
||||
|
||||
## Tech Stack
|
||||
- **Language**: Python 3.13+
|
||||
- **Framework**: Django 5.2.7
|
||||
- **Database**: SQLite (default)
|
||||
- **Dependencies**: django, yfinance (market data), gunicorn (production server), requests (HTTP callbacks)
|
||||
- **Package Manager**: uv
|
||||
- **Deployment**: Docker + docker-compose, gunicorn
|
||||
|
||||
## Project Structure
|
||||
```
|
||||
executor/ # Django project config (settings, urls, wsgi, asgi)
|
||||
strategies/ # Main Django app
|
||||
models.py # QuantStrategy, StrategyVersion, StrategyExecution
|
||||
views.py # API views (list_strategies, execute_strategy, execution_status, send_callback)
|
||||
base.py # BaseQuantStrategy abstract class, StrategyRegistry
|
||||
implementations.py # Strategy registration
|
||||
impls/ # Strategy implementations
|
||||
trend_following.py
|
||||
mean_reversion.py
|
||||
volatility_breakout.py
|
||||
asset_allocation.py
|
||||
management/commands/ # init_strategies command
|
||||
urls.py
|
||||
admin.py
|
||||
templates/ # Global templates (empty)
|
||||
staticfiles/ # Collected static files
|
||||
mediafiles/ # Media files
|
||||
```
|
||||
|
||||
## Architecture
|
||||
- Strategies follow a registry pattern: `BaseQuantStrategy` base class + `StrategyRegistry` for registration
|
||||
- Strategy implementations live in `strategies/impls/` and register via `@strategy` decorator
|
||||
- API is function-based views (not DRF), returning JSON
|
||||
- Execution model tracks strategy runs with status and results
|
||||
- Callback support for async notification of execution results
|
||||
23
.serena/memories/style_and_conventions.md
Normal file
23
.serena/memories/style_and_conventions.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Code Style and Conventions
|
||||
|
||||
## Python Style
|
||||
- Standard Python/Django conventions
|
||||
- No type hints used in existing code
|
||||
- Minimal docstrings (Django-generated defaults)
|
||||
- Snake_case for functions/variables, PascalCase for classes
|
||||
- Single quotes for strings throughout
|
||||
|
||||
## Django Patterns
|
||||
- Function-based views (not class-based views, not DRF)
|
||||
- JSON responses via `django.http.JsonResponse`
|
||||
- Models use `Meta` inner classes for ordering/constraints
|
||||
- Standard Django project layout
|
||||
|
||||
## Strategy Pattern
|
||||
- Base class: `BaseQuantStrategy` with abstract methods (`name`, `description`, `version`, `default_parameters`, `execute`)
|
||||
- Registration via `@strategy` decorator and `StrategyRegistry`
|
||||
- Implementations in `strategies/impls/` directory
|
||||
|
||||
## Comments
|
||||
- Korean language used in some comments (Dockerfile, etc.)
|
||||
- Code comments are sparse
|
||||
43
.serena/memories/suggested_commands.md
Normal file
43
.serena/memories/suggested_commands.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Suggested Commands
|
||||
|
||||
## Environment
|
||||
```bash
|
||||
source .venv/bin/activate
|
||||
uv sync # Install/sync dependencies
|
||||
```
|
||||
|
||||
## Development
|
||||
```bash
|
||||
python manage.py runserver # Run dev server (port 8000)
|
||||
python manage.py shell # Django interactive shell
|
||||
python manage.py createsuperuser # Create admin user
|
||||
```
|
||||
|
||||
## Database
|
||||
```bash
|
||||
python manage.py makemigrations # Create migration files
|
||||
python manage.py migrate # Apply migrations
|
||||
python manage.py init_strategies # Initialize strategy data
|
||||
```
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
python manage.py test # Run Django tests
|
||||
```
|
||||
|
||||
## Static Files
|
||||
```bash
|
||||
python manage.py collectstatic # Collect static files
|
||||
```
|
||||
|
||||
## Docker
|
||||
```bash
|
||||
docker-compose up --build # Build and run with Docker
|
||||
docker-compose down # Stop containers
|
||||
```
|
||||
|
||||
## System Utilities (macOS/Darwin)
|
||||
```bash
|
||||
git status / git diff / git log # Git operations
|
||||
ls / find / grep # File operations (prefer tool equivalents)
|
||||
```
|
||||
9
.serena/memories/task_completion_checklist.md
Normal file
9
.serena/memories/task_completion_checklist.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Task Completion Checklist
|
||||
|
||||
After completing a coding task, ensure:
|
||||
|
||||
1. **Migrations**: If models were changed, run `python manage.py makemigrations` and `python manage.py migrate`
|
||||
2. **Tests**: Run `python manage.py test` to verify nothing is broken
|
||||
3. **No linter/formatter configured**: The project does not currently have a linter or formatter set up (no ruff, black, flake8, etc. in pyproject.toml)
|
||||
4. **Static files**: If templates/static files changed, run `python manage.py collectstatic`
|
||||
5. **Strategy registration**: If a new strategy was added, ensure it's registered in `strategies/implementations.py` and `strategies/impls/__init__.py`
|
||||
Reference in New Issue
Block a user