mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-27 13:12:55 +08:00
Create comprehensive plan for generating Cursor rule files from library best practices, including: - Project overview and implementation strategy - Detailed steps for library research and MDC file creation - Proposed file structure for generated MDC files - Execution roadmap for script development The plan outlines a systematic approach to leveraging Exa API and LiteLLM for automated best practice documentation generation
2.1 KiB
2.1 KiB
Plan for Creating MDC Files from Library Best Practices
Project Overview
Create a script that generates Cursor rule files (.mdc) for various libraries and frameworks based on their best practices. The script will leverage:
- Exa API for searching and retrieving library best practices
- LiteLLM with Gemini 2.0 Flash for enhancing and structuring content
- Existing utility functions from convert_to_mdc.py where applicable
Implementation Steps
-
Parse Libraries JSON
- Extract all libraries and frameworks from libraries.json
- Create a flattened list of all technologies
- Organize them by category for better file structure
-
Set Up API Integration
- Configure Exa API client
- Set up LiteLLM with proper rate limiting
- Ensure proper error handling and retries
-
Create Data Collection Pipeline
- For each library/framework:
- Use Exa to search for best practices
- Parse and clean the search results
- If results are insufficient, enhance with Gemini 2.0 Flash
- For each library/framework:
-
Generate MDC Files
- Format data according to MDC file structure
- Create appropriate glob patterns
- Organize into logical categories
-
Create File Structure
- Use categories from libraries.json (frontend, backend, etc.)
- Name files according to library/framework (e.g., frontend/nextjs.mdc)
- Save files to appropriate directories
-
Implement Progress Tracking
- Track which libraries have been processed
- Allow for resuming the process if interrupted
File Structure
├── frontend/
│ ├── react.mdc
│ ├── nextjs.mdc
│ ├── vue.mdc
│ └── ...
├── backend/
│ ├── express.mdc
│ ├── django.mdc
│ └── ...
├── database/
│ ├── postgresql.mdc
│ ├── mongodb.mdc
│ └── ...
└── ...
Execution Plan
- Create main script that orchestrates the process
- Implement utility functions for API interactions
- Create MDC generation function based on convert_to_mdc.py
- Test with a small subset of libraries
- Run full generation process
- Review and validate generated MDC files