Skip to content

Instantly share code, notes, and snippets.

View bossjones's full-sized avatar
💭
Learning every damn thing I can

Malcolm Jones (bossjones/Tony Dark) bossjones

💭
Learning every damn thing I can
View GitHub Profile

Okay, let's break down prompt_library.py into a more modular structure within the promptlib directory.

The core idea is to separate concerns:

  1. Data Structures (Types): Definitions of how cursor rules look.
  2. Constants: Configuration like paths and patterns.
  3. Core Rule Logic: Functions for reading, parsing, and generating rule files.
  4. MCP Endpoints: Separate files for Resources, Prompts, and Tools.
  5. Complex Workflows: Isolate the multi-phase workflow logic.
  6. Server Setup: Initialize the FastMCP server and register all endpoints.

BMad's Best Practices Cursor Custom Agents and Rules Generator

BMad Version: 3.1 (March 30, 2025) Cursor Version: 0.48+

Note from BMad: This repo has become much more successful than I originally envisioned, and I want to thank everyone for the feedback, support, contributions, and also feedback on the youtube channel. I now realize that many are using what I originally thought would be just a way to document some best practices around cursor rules and a simple rule that helps generate the rules - all with the intent of creating a separate updated workflow repo and set of documentation. But this has evolved.

With that in mind, going forward after this correction update - any major changes will follow a versioning standard, and upgrade paths or instructions to migrate if you are already using a prior version of rules or workflows whenever there is a significant potentially breaking change - although I will try to avoid that somehow depending on what comes with Cursor updates or workflow improvements. Keep

@bossjones
bossjones / how_to_use_llmstxt.md
Last active April 12, 2025 17:49
https://github.com/rlancemartin/llmstxt_architect - LLMsTxt Architect is a Python package that builds LLMs.txt automatically, using LLMs to automate the process.

langchain LLMs-txt Overview - langchain-ai/mcpdoc - Expose llms-txt to IDEs for development vibe-code-benchmark - Code agents like Cursor have transformed how many of us work. Protocols like MCP (Model Context Protocol) can connect these agents with external data sources. This repo tests how different code agents compare and how best to connect them to external data.

@bossjones
bossjones / lunar_vim_needs.md
Created April 1, 2025 15:06
lunar_vim_needs.md for zsh-dotfiles
  151  brew install go-task
  152  lvim Taskfile.yml
  153  task -g --list
  154  nvim --version
  155  asdf current
  157  cat ~/.config/lvim/config.lua | pbcopy
  158  cat ~/.config/lvim/config.lua
  160  ls ~/.local/share/nvim/site/pack/lazy/opt/nvim-treesitter
  161  ls ~/.local/share/lunarvim/site/pack/lazy/opt/
@bossjones
bossjones / RULESFORAI.md
Created March 27, 2025 14:00
RULESFORAI.md

STRICT RULES:

  • 🧠 DON'T BE LAZY AND BE ATTENTIVE! AND DON'T GET HALLUCINATIONS, BE CONSISTENT!
  • 👨‍💻 Treat the user as a beginner web developer and you are super ultra expert professional AI assistant that will do all of the recommendations, suggestions, to control the workflow.
  • ✅ Follow the user's requirements carefully & to the letter.
  • 🔍 First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
  • 🔎 Search codebase first, then write code
  • 🛠️ Fully implement all requested functionality.
  • 🚫 Leave NO todo's, placeholders or missing pieces.
  • ✔️ Ensure code is complete! Verify thoroughly finalized.
@bossjones
bossjones / tdd_missing.md
Created March 25, 2025 22:07
tdd_missing.md

I'll analyze each of the six Python rules we created and provide a checklist of what's covered and what might be missing. Let me go through them one by one.

  1. python-tdd-basics.mdc.md

✅ Covered:

  • Core TDD cycle explanation
  • Test structure template with type hints
  • Testing directory setup instructions
  • Basic test fixtures setup
  • Common testing patterns (fixtures, parametrized tests, exceptions)
@bossjones
bossjones / plan_and_execute_prompt_library_workflow.md
Created March 12, 2025 02:22
plan_and_execute_prompt_library_workflow.md for uv-fastapi-example

params:

{ "repo_description": "A FastAPI application managed as a uv project, based on the multi-file example from the FastAPI documentation. It demonstrates a structured FastAPI application with routers, dependencies, and internal components.", "main_languages": "Python", "file_patterns": ".py, pyproject.toml, Dockerfile", "key_features": "FastAPI, API endpoints, dependency injection, router organization, uv package management" }

@bossjones
bossjones / prompt_to_imporve_prompt_library.md
Created March 11, 2025 16:43
prompt_to_imporve_prompt_library.md

using your grep tools locate def prep_workspace (it's located in src/codegen_lab/prompt_library.py), I want you to enhance this to do the following:

You are an expert Python developer tasked with enhancing the prep_workspace function in our MCP-based tool. The current function prepares a workspace for cursor rules by creating directories and providing instructions. Your task is to expand this function to:

  1. Write four mandatory cursor rule files to the client repo's cursor rules directory:
    • tree.mdc.md
    • repo_analyzer.mdc.md
    • notify.mdc.md
    • repomix.mdc.md
@bossjones
bossjones / sequentialthinking.py
Created March 11, 2025 02:49
sequentialthinking.py test_requentialthinking.py port of https://github.com/modelcontextprotocol/servers/blob/main/src/sequentialthinking/index.ts in python w/ fastmcp
#!/usr/bin/env python3
"""
Sequential Thinking FastMCP Server
This module implements a FastMCP server for the Sequential Thinking tool, which enables
dynamic and reflective problem-solving through a structured thinking process.
The Sequential Thinking tool helps break down complex problems into manageable steps,
allowing for revision, branching, and iterative refinement of thoughts. It maintains
#!/usr/bin/env python3
import asyncio
import json
import sys
from typing import Dict, List, Any, Optional, TypedDict
from mcp.server import Server
from mcp.server.stdio import StdioServerTransport
from mcp.types import CallToolRequestSchema, ListToolsRequestSchema, Tool