cursor-rules-agile / rules
Cursor rule6 starsChanged 18 months agoApache-2.0Archived repositoryView on GitHub
Create UML Class Diagram for Java Projects
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,523 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository23 other files it gives its agents.
- .cursor/rules/2000-agile-checklist.mdcCursor rule
- .cursor/rules/2001-agile-create-an-epic.mdcCursor rule
- .cursor/rules/2002-agile-create-features-from-epics.mdcCursor rule
- .cursor/rules/2003-agile-create-user-story.mdcCursor rule
- .cursor/rules/2004-uml-sequence-diagram-about-solution.mdcCursor rule
- .cursor/rules/2005-c4-diagrams-about-solution.mdcCursor rule
- .cursor/rules/2006-adr-create-functional-requirements-for-cli-development.mdcCursor rule
- .cursor/rules/2006-adr-create-functional-requirements-for-rest-api-development.mdcCursor rule
- .cursor/rules/2007-adr-create-acceptance-testing-strategy.mdcCursor rule
- .cursor/rules/2008-adr-create-non-functional-requirements-decisions.mdcCursor rule
- .cursor/rules/2100-create-task-list.mdcCursor rule
- .cursor/rules/2101-implement-task-list.mdcCursor rule
- .cursor/rules/2102-agile-create-dor.mdcCursor rule
- .cursor/rules/2300-adr-conversational-assistant.mdcCursor rule
- .cursor/rules/templates/agile-adr-fr-cli-template.mdCursor rule
- .cursor/rules/templates/agile-adr-fr-rest-template.mdCursor rule
- .cursor/rules/templates/agile-adr-nfr-template.mdCursor rule
- .cursor/rules/templates/agile-adr-template.mdCursor rule
- .cursor/rules/templates/agile-checklist-template.mdCursor rule
- .cursor/rules/templates/agile-epic-template.mdCursor rule
- .cursor/rules/templates/agile-feature-template.mdCursor rule
- .cursor/rules/templates/agile-gherkin-template.mdCursor rule
- .cursor/rules/templates/agile-user-story-template.mdCursor rule
The file
We split this 2200-uml-class-diagram.mdc into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 67
Include external dependencies: only if they are central to understanding the architecture
- Distinctive: line 84
Use composition (filled diamond) for strong ownership relationships
- Distinctive: line 85
Use aggregation (empty diamond) for weak ownership relationships
- Distinctive: line 86
Use dependency (dashed arrow) for method parameters or temporary usage
- Distinctive: line 87
Use inheritance (solid arrow with triangle) for extends relationships
- Distinctive: line 88
Use implementation (dashed arrow with triangle) for implements relationships
- Distinctive: line 100
When generating a class diagram, structure your response as:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Create UML Class Diagram for Java Projects
globs:
alwaysApply: false
---
# Create UML Class Diagram Generator for Java Projects
You are an expert in creating PlantUML class diagrams from Java codebases. When asked to create a class diagram for a repository, follow these guidelines:
## Analysis Process
1. **Scan the Java source code** in `src/main/java` to identify all classes, interfaces, enums, and records
2. **Analyze relationships** between classes including:
- Inheritance (extends)
- Implementation (implements)
- Composition (has-a relationships)
- Aggregation (uses relationships)
- Dependencies (method parameters, return types)
3. **Identify key attributes and methods** for each class
4. **Group related classes** into logical packages or modules
## PlantUML Diagram Structure
Generate a PlantUML class diagram using this template:
```plantuml
@startuml ClassName_Diagram
!theme plain
skinparam classAttributeIconSize 0
skinparam classFontStyle bold
skinparam packageStyle rectangle
' Package declarations
package "info.jab.core" {
' Classes go here
}
' Class definitions with proper stereotypes
class ClassName {
- privateField : Type
+ publicField : Type
# protectedField : Type
~ packageField : Type
--
+ publicMethod() : ReturnType
- privateMethod() : ReturnType
# protectedMethod() : ReturnType
~ packageMethod() : ReturnType
}
' Relationships
ClassA ||--|| ClassB : composition
ClassA ||--o{ ClassC : aggregation
ClassA --|> ClassD : inheritance
ClassA ..|> InterfaceE : implementation
ClassA ..> ClassF : dependency
' Notes for important design patterns or architectural decisions
note right of ClassName : Important design note
@enduml
```
## Specific Rules for This Project
1. **Focus on the core business logic** classes in the main package
2. **Include external dependencies** only if they are central to understanding the architecture
3. **Show method signatures** for public methods and important private methods
4. **Highlight design patterns** used (Command pattern, Strategy pattern, etc.)
5. **Include validation and service layers** as separate concerns
6. **Show dependency injection** relationships clearly
## Class Diagram Elements to Include
- **CLI Classes**: Command-line interface classes with their options and commands
- **Service Classes**: Business logic and core functionality
- **Validator Classes**: Input validation and system checks
- **Utility Classes**: Helper classes and utilities
- **Data Classes**: DTOs, entities, or value objects
- **Exception Classes**: Custom exceptions if present
## Relationship Guidelines
- Use **composition** (filled diamond) for strong ownership relationships
- Use **aggregation** (empty diamond) for weak ownership relationships
- Use **dependency** (dashed arrow) for method parameters or temporary usage
- Use **inheritance** (solid arrow with triangle) for extends relationships
- Use **implementation** (dashed arrow with triangle) for implements relationships
## Output Format
Always provide:
1. A complete PlantUML diagram with proper syntax
2. Brief explanation of the main architectural patterns identified
3. Key relationships and their significance
4. Any notable design decisions reflected in the class structure
## Example Output Structure
When generating a class diagram, structure your response as:
```
Here's the PlantUML class diagram for the repository:
[PlantUML code block]
## Architecture Overview
- Brief description of the main architectural patterns
- Key design decisions
- Important relationships between classes
## Key Components
- Description of main classes and their responsibilities
- Explanation of how components interact
```
Remember to keep the diagram clean and focused on the most important relationships while maintaining readability.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

