-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cursorrules
111 lines (83 loc) · 2.78 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Code Analysis CLI
Description: CLI tools for gathering and analyzing code for LLM processing
## Best Practices
Code Organization:
- Use clean architecture principles to separate concerns
- Implement command pattern for different CLI operations
- Follow SOLID principles, especially single responsibility
- Use TypeScript for better type safety and maintainability
- Implement proper error handling and logging
- Write comprehensive tests for CLI commands
Git Practices:
- Use conventional commits (feat:, fix:, docs:, etc.)
- Keep commits atomic and focused
- Maintain a clean git history
- Use .gitignore for node_modules, build artifacts, and sensitive files
- Document git workflow in CONTRIBUTING.md
Documentation:
- Maintain clear README with setup and usage instructions
- Use JSDoc for function and class documentation
- Include examples for each CLI command
- Document configuration options and environment variables
- Use comprehensive JSDoc comments for all functions, classes, and interfaces with @param, @returns, and @throws tags
## Recommended Libraries
Core:
- repomix: For repository analysis and manipulation
- commander: For building the CLI interface
- chalk: For colorful terminal output
- ora: For loading spinners
- inquirer: For interactive prompts
- glob: For file pattern matching
- simple-git: For git operations
Parsing:
- tree-sitter: For precise code parsing
- unified: For markdown processing
- prettier: For code formatting
Testing:
- jest: For unit and integration testing
- ts-jest: For TypeScript support in tests
Development:
- typescript: For type safety
- eslint: For code linting
- husky: For git hooks
- nodemon: For development reload
## Project Structure
src/
├── commands/ # Individual CLI command implementations
├── services/
│ ├── git/ # Git-related operations
│ ├── parser/ # Code parsing and analysis
│ ├── llm/ # LLM integration and prompting
│ └── diff/ # Code diff generation and processing
├── utils/ # Shared utilities and helpers
├── types/ # TypeScript type definitions
└── config/ # Configuration management
tests/
├── unit/ # Unit tests
├── integration/ # Integration tests
└── fixtures/ # Test data and mock files
docs/
├── api/ # API documentation
├── examples/ # Usage examples
└── contributing/ # Contribution guidelines
## Configuration
Recommended Settings:
- Maximum file size: 10mb
- Default ignore patterns:
- node_modules
- dist
- build
- .git
Supported Languages:
- JavaScript
- TypeScript
- Python
- Java
- Go
- Rust
## CLI Commands
analyze: Analyze code structure and dependencies
diff: Generate and process code diffs
extract: Extract specific code segments or patterns
prompt: Generate LLM prompts from code
deps: Analyze project dependencies