Skip to content
Prompt

lemcs — Cursor Rules

by medelman17

AI Summary

Cursor rules for LangGraph multi-agent legal document processing workflows, providing architecture guidelines and patterns for orchestrating specialized legal analysis agents. Beneficial for developers building legal tech systems with LLM-based document workflows.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "lemcs — Cursor Rules" prompt rules to my project.
Repository: https://github.com/medelman17/lemcs

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

LangGraph multi-agent system guidelines for legal document processing workflows

Agent Architecture Overview

The LeMCS system uses LangGraph for orchestrating specialized legal agents in document processing workflows.

Core Agent Components

• Orchestrator (@agents/orchestrator.py) - Workflow coordination • Legal Analyzer (@agents/legal_analyzer.py) - Document analysis • Citation Extractor (@agents/citation_extractor.py) - Citation processing • Synthesis Agent (@agents/synthesis_agent.py) - Document consolidation

State Graph Definition

`python from langgraph import StateGraph from typing import TypedDict, List, Dict, Any class AgentState(TypedDict): """Shared state across all agents.""" documents: List[str] analyses: List[Dict[str, Any]] citations: List[Dict[str, Any]] consolidated_output: str errors: List[str] current_step: str def create_workflow() -> StateGraph: """Create the legal document processing workflow.""" workflow = StateGraph(AgentState) # Add agent nodes workflow.add_node("analyze", legal_analysis_agent) workflow.add_node("extract_citations", citation_extraction_agent) workflow.add_node("synthesize", synthesis_agent) # Define workflow edges workflow.add_edge("analyze", "extract_citations") workflow.add_edge("extract_citations", "synthesize") return workflow `

Agent Implementation Pattern

`python from nlp.hybrid_legal_nlp import HybridLegalNLP async def legal_analysis_agent(state: AgentState) -> AgentState: """Analyze legal documents using hybrid NLP.""" nlp = HybridLegalNLP() analyses = [] for document in state["documents"]: try: analysis = nlp.comprehensive_analysis(document) analyses.append(analysis) except Exception as e: state["errors"].append(f"Analysis failed: {e}") state["analyses"] = analyses state["current_step"] = "analysis_complete" return state `

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 10mo ago
Stale
AdoptionUnder 100 stars
0 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Issues0
Updated10mo ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more