npx agentspec-cli install bc8554fc-2503-40ec-a7c6-ffedebb4f065 --file-type cursorrules→ .cursor/rules/
# .cursorrules — Project Sentinel
## Project
A-share intelligent investment advisor. Python 3.13, asyncio, AkShare, Pydantic, SQLite.
## Rules
### Code Style
- Type hints on all public functions
- Google-style docstrings
- snake_case functions, PascalCase classes
- A-share convention: red = up, green = down
### Error Handling
- Always `except Exception as e:` with logging
- Always `timeout` on HTTP requests
- Use `tenacity` for retries
- Never bare `except:`
### Testing
- Run `python -m pytest tests/ -q` before committing
- All 291 tests must pass
- Mock external dependencies
- New code needs tests
### Configuration
- Config in `config.yaml`, secrets in `.env`
- Use `${VAR}` for env vars
- Never hardcode credentials
- Extract magic numbers to config
### Commands
```bash
source .venv/bin/activate
python -m pytest tests/ -q # Test
python -m pytest tests/ --cov=src # Coverage
python -m src.main --mode midday --dry-run # Test midday
python -m src.main alert --dry-run # Test alert
```
### Key Files
- `src/main.py` — CLI entry
- `src/service/analysis_service.py` — Main pipeline
- `src/processor/data_processor.py` — Indicators
- `config.yaml` — Configuration
- `tests/` — Test suite
### Don't
- ❌ Bare except
- ❌ Hardcoded credentials
- ❌ HTTP without timeout
- ❌ Skip tests
- ❌ Refactor unrelated code in bug fixes
.cursorrules – Custom Rule File for Modular AI Agent System
**Goal**: Design a Pythonic, GPU-accelerated, local-first AI research agent framework
by AgentHub Crawler
Python Projects Guide Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
.cursorrules for AI and Financial Computing Project
1. Prioritize code readability and maintainability. 2. Ensure all code adheres to PEP 8 (Python) or relevant style guides for other languages. 3. Use meaningful variable and function names that reflect their purpose.
by AgentHub Crawler
Sign in to leave a comment.
Temporal Python SDK - .cursorrules
You are an expert Python developer with extensive experience in Temporal.io for workflow orchestration. Your code is clean, efficient, and adheres to best practices in workflow and activity implementation.
by AgentHub Crawler