From 4383a18f477ba92e17815ed776d7396f03eef7f0 Mon Sep 17 00:00:00 2001 From: smypmsa Date: Mon, 14 Jul 2025 20:07:50 +0000 Subject: [PATCH] docs: add cursor rules --- .cursor/rules/bots.mdc | 8 ++++++++ .cursor/rules/cleanup.mdc | 9 +++++++++ .cursor/rules/core.mdc | 11 +++++++++++ .cursor/rules/idl.mdc | 8 ++++++++ .cursor/rules/monitoring.mdc | 9 +++++++++ .cursor/rules/project-structure.mdc | 17 +++++++++++++++++ .cursor/rules/tests.mdc | 9 +++++++++ .cursor/rules/trading.mdc | 11 +++++++++++ .cursor/rules/utils.mdc | 8 ++++++++ 9 files changed, 90 insertions(+) create mode 100644 .cursor/rules/bots.mdc create mode 100644 .cursor/rules/cleanup.mdc create mode 100644 .cursor/rules/core.mdc create mode 100644 .cursor/rules/idl.mdc create mode 100644 .cursor/rules/monitoring.mdc create mode 100644 .cursor/rules/project-structure.mdc create mode 100644 .cursor/rules/tests.mdc create mode 100644 .cursor/rules/trading.mdc create mode 100644 .cursor/rules/utils.mdc diff --git a/.cursor/rules/bots.mdc b/.cursor/rules/bots.mdc new file mode 100644 index 0000000..3e6df60 --- /dev/null +++ b/.cursor/rules/bots.mdc @@ -0,0 +1,8 @@ +# Bot Configuration Guide + +- YAML files in this directory define configuration for different bot strategies and behaviors. +- Each file specifies parameters for a specific bot instance or strategy. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/cleanup.mdc b/.cursor/rules/cleanup.mdc new file mode 100644 index 0000000..f672857 --- /dev/null +++ b/.cursor/rules/cleanup.mdc @@ -0,0 +1,9 @@ +# Cleanup Logic Guide + +- [manager.py](mdc:src/cleanup/manager.py) manages cleanup operations and resource management. +- [modes.py](mdc:src/cleanup/modes.py) defines cleanup modes and strategies. +- This directory is responsible for resource cleanup and related logic. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/core.mdc b/.cursor/rules/core.mdc new file mode 100644 index 0000000..da6b816 --- /dev/null +++ b/.cursor/rules/core.mdc @@ -0,0 +1,11 @@ +# Core Logic Guide + +- [client.py](mdc:src/core/client.py) handles blockchain client interactions. +- [wallet.py](mdc:src/core/wallet.py) manages wallet logic. +- [pubkeys.py](mdc:src/core/pubkeys.py) stores and manages public keys. +- [curve.py](mdc:src/core/curve.py) provides curve math and related utilities. +- This directory contains core abstractions and logic for blockchain and protocol interactions. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/idl.mdc b/.cursor/rules/idl.mdc new file mode 100644 index 0000000..af22eca --- /dev/null +++ b/.cursor/rules/idl.mdc @@ -0,0 +1,8 @@ +# Interface Definition Guide + +- JSON files in this directory define program interfaces (IDLs) for interacting with on-chain programs. +- These files are used for serialization, deserialization, and program interaction logic. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/monitoring.mdc b/.cursor/rules/monitoring.mdc new file mode 100644 index 0000000..6a4037e --- /dev/null +++ b/.cursor/rules/monitoring.mdc @@ -0,0 +1,9 @@ +# Monitoring Logic Guide + +- Listener files (e.g., [pumpportal_listener.py](mdc:src/monitoring/pumpportal_listener.py), [logs_listener.py](mdc:src/monitoring/logs_listener.py), [geyser_listener.py](mdc:src/monitoring/geyser_listener.py), [block_listener.py](mdc:src/monitoring/block_listener.py)) are responsible for subscribing to and receiving events from various sources. +- Event processor files (e.g., [pumpportal_event_processor.py](mdc:src/monitoring/pumpportal_event_processor.py), [logs_event_processor.py](mdc:src/monitoring/logs_event_processor.py), [geyser_event_processor.py](mdc:src/monitoring/geyser_event_processor.py), [block_event_processor.py](mdc:src/monitoring/block_event_processor.py)) handle the logic for processing and reacting to those events. +- [base_listener.py](mdc:src/monitoring/base_listener.py) provides shared abstractions for listeners. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/project-structure.mdc b/.cursor/rules/project-structure.mdc new file mode 100644 index 0000000..5d97e0b --- /dev/null +++ b/.cursor/rules/project-structure.mdc @@ -0,0 +1,17 @@ +# Project Structure Guide + +- The main source code is in the [src/](mdc:src/) directory. +- Trading logic is in [src/trading/](mdc:src/trading/), including [trader.py](mdc:src/trading/trader.py), [buyer.py](mdc:src/trading/buyer.py), and [seller.py](mdc:src/trading/seller.py). +- Monitoring logic is in [src/monitoring/](mdc:src/monitoring/), with various listeners and event processors. +- Utility functions are in [src/utils/](mdc:src/utils/). +- Core abstractions and blockchain logic are in [src/core/](mdc:src/core/). +- Cleanup logic is in [src/cleanup/](mdc:src/cleanup/). +- Geyser-related code is in [src/geyser/](mdc:src/geyser/). +- Bot configuration files are in [bots/](mdc:bots/). +- Trade logs are in [trades/](mdc:trades/). +- Interface definitions are in [idl/](mdc:idl/). +- Tests are in [tests/](mdc:tests/). +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/tests.mdc b/.cursor/rules/tests.mdc new file mode 100644 index 0000000..3c8642a --- /dev/null +++ b/.cursor/rules/tests.mdc @@ -0,0 +1,9 @@ +# Testing Guide + +- Python files in this directory contain tests for listeners and other core components. +- Tests are organized by component type (e.g., geyser, logs, block listeners). +- [compare_listeners.py](mdc:tests/compare_listeners.py) is used for comparing listener outputs. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/trading.mdc b/.cursor/rules/trading.mdc new file mode 100644 index 0000000..f9f57f8 --- /dev/null +++ b/.cursor/rules/trading.mdc @@ -0,0 +1,11 @@ +# Trading Logic Guide + +- [trader.py](mdc:src/trading/trader.py) is the main entry point for trading operations, orchestrating buy and sell actions. +- [buyer.py](mdc:src/trading/buyer.py) implements logic for buying assets. +- [seller.py](mdc:src/trading/seller.py) implements logic for selling assets. +- [position.py](mdc:src/trading/position.py) manages trading positions. +- [base.py](mdc:src/trading/base.py) provides base classes and shared abstractions for trading components. +description: +globs: +alwaysApply: false +--- diff --git a/.cursor/rules/utils.mdc b/.cursor/rules/utils.mdc new file mode 100644 index 0000000..27d7b11 --- /dev/null +++ b/.cursor/rules/utils.mdc @@ -0,0 +1,8 @@ +# Utility Functions Guide + +- [logger.py](mdc:src/utils/logger.py) provides logging utilities for the project. +- Utility modules in this directory are intended for shared, reusable helper functions and classes. +description: +globs: +alwaysApply: false +---