Okay, let's break down prompt_library.py
into a more modular structure within the promptlib
directory.
The core idea is to separate concerns:
- Data Structures (Types): Definitions of how cursor rules look.
- Constants: Configuration like paths and patterns.
- Core Rule Logic: Functions for reading, parsing, and generating rule files.
- MCP Endpoints: Separate files for Resources, Prompts, and Tools.
- Complex Workflows: Isolate the multi-phase workflow logic.
- Server Setup: Initialize the FastMCP server and register all endpoints.