wip(cursor): craft cursor rules

This commit is contained in:
smypmsa
2025-07-15 14:33:17 +00:00
parent 7e30ef627a
commit 359582d0c9
8 changed files with 649 additions and 70 deletions
+42 -6
View File
@@ -1,8 +1,44 @@
---
description: Shared utilities and helper functions for common operations. Apply when working with project-wide utilities.
globs: src/utils/*.py
alwaysApply: true
---
# 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
---
## Overview
The utils module provides shared functionality and helper methods used throughout the pump-bot system. These utilities handle common concerns like logging.
## Core Utilities
### Logging
@src/utils/logger.py implements a centralized logging system:
- Consistent log formatting across the application
- Log level management
- File and console output handling
- Context-aware logging with component identification
```python
# Example usage
logger = get_logger(__name__)
logger.info("Processing token %s", token_mint)
```
## Common Patterns
| Operation | Utility |
|-----------|---------|
| Logging | `get_logger(__name__)` |
## Best Practices
1. **Reuse existing utilities** rather than implementing similar functionality
2. **Keep utilities focused** on a single responsibility
3. **Document usage examples** for each utility
4. **Maintain backward compatibility** when enhancing utilities
## Related Files
- @src/utils/logger.py: Centralized logging system