Best Practices for Library Selection
- Never stray off the standard path.
- Avoid using obscure or new libraries.
- Use libraries and frameworks that Claude or GPT-4 will understand.
- This reduces the need to manually add context about changes.
Workflow Tips
Development Cycle
- Generate code.
- Address TypeScript errors.
- Feed errors back into Claude.
- Use the problems tab in Cursor (CMD/CTRL + A to copy).
- Remember to restart the TypeScript server after using composer.
Context Management
- Gathering relevant file context is crucial for effective Cursor usage.
- The
.cursorrules
file works best when placed in subdirectories (apps/web/api).
- Open Cursor directly in the subdirectory containing
.cursorrules
.
- Use
cursor.directory
as a starting place for your .cursorrules
file.
Working with LLMs
- Alternate between using Claude as:
- A worker (for direct tasks).
- A teacher (for learning and discovery).
- Emotional prompting can be effective.
- Long-running chat windows may experience performance degradation.
Troubleshooting
When Things Go Wrong
- Question outputs - LLMs can lead you down incorrect paths.
- As a senior engineer, verify the LLM truly understands the request.
- If you've failed 3 times, the issue might be with your approach.
- For persistent failures with proper context, break the task into smaller pieces.
Known Issues
- Composer may cause occasional regressions.
- When encountering LLM bugs:
- Assume it's a pre-training issue (with proper context).
- Document solutions in
.cursorrules
.
- Consider these documentation entries as temporary fixes.
- Review and remove when model updates occur.
Quality Assurance
- After generating significant code, request Cursor to perform bug checks.
- The more you understand your programming language and primitives:
- The more effectively Claude can work in 'worker mode'.
- The less time needed in 'Discovery/learning' mode.