Skip to content

Commit 5d6b91b

Browse files
committed
Improved README
1 parent b47b8bc commit 5d6b91b

4 files changed

Lines changed: 73 additions & 66 deletions

File tree

.cursor/rules/100-java-checklist-guide.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Your task is to create a comprehensive step-by-step guide that follows the exact
1515

1616
## Instructions for AI
1717

18-
Create a markdown file named `JAVA-DEVELOPMENT-GUIDE.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
18+
Create a markdown file named `CURSOR-RULES-JAVA.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
1919

2020
### Restrictions
2121

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
# Java Development Guide
1+
# Cursor rules Java
22

3-
Use the following process to improve the java development in some areas if required using the following set of Java Cursor Rules.
3+
Use the following set of Java Cursor Rules to improve your Java development.
44

5-
## Process Overview
6-
7-
### Build system rules (Maven)
5+
## Build system rules (Maven)
86

97
| Cursor Rule | Description | Prompt | Notes |
108
|-------------|-------------|--------|-------|
119
| [110-java-maven-best-practices](.cursor/rules/110-java-maven-best-practices.mdc) | Analyze your `pom.xml` and apply Maven best practices | **Prompt:** `Help me to review the pom.xml following the best practices for dependency management and directory structure use the cursor rule @110-java-maven-best-practices` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | This cursor rule is applied automatically without any interaction with the Software engineer. |
1210
| [111-java-maven-deps-and-plugins](.cursor/rules/111-java-maven-deps-and-plugins.mdc) | Update your `pom.xml` with Maven Dependencies & Plugins | **Prompt:** `Can you improve the pom.xml using the cursor rule @111-java-maven-deps-and-plugins` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | Using a Conversational approach, the Software engineer will interact with the cursor rule to update the `pom.xml`. |
1311
| [112-java-maven-documentation](.cursor/rules/112-java-maven-documentation.mdc) | Create a Maven Documentation with the file `README-DEV.md` | **Prompt:** `Generate developer documentation with essential Maven commands using @112-java-maven-documentation` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | This cursor rule is applied automatically without any interaction with the Software engineer. |
1412

15-
### Design rules
13+
## Design rules
1614

1715
| Cursor Rule | Description | Prompt | Notes |
1816
|-------------|-------------|--------|-------|
1917
| [121-java-object-oriented-design](.cursor/rules/121-java-object-oriented-design.mdc) | Take another point of view with an Object Oriented Design of your development | **Prompt:** `Review my code for object-oriented design using the cursor rule @121-java-object-oriented-design` **Note:** Add in the context a package to improve the design. | This cursor rule is applied automatically without any interaction with the Software engineer. It is an interesting prompt to see what alternatives offer the model for your package. |
2018
| [122-java-type-design](.cursor/rules/122-java-type-design.mdc) | Review the Type Design in your development | **Prompt:** `Help me improve my type design using the cursor rule @122-java-type-design` **Note:** Add in the context a package to improve the design. | This cursor rule is applied automatically without any interaction with the Software engineer. It is an interesting prompt to see what alternatives offer the model for your package. |
2119

22-
### Coding rules
20+
## Coding rules
2321

2422
| Cursor Rule | Description | Prompt | Notes |
2523
|-------------|-------------|--------|-------|
@@ -28,27 +26,27 @@ Use the following process to improve the java development in some areas if requi
2826
| [125-java-concurrency](.cursor/rules/125-java-concurrency.mdc) | Improve your code with Concurrency rules | **Prompt:** `Review my code for concurrency best practices using the cursor rule @125-java-concurrency` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | Non conversational cursor rule. |
2927
| [126-java-logging](.cursor/rules/126-java-logging.mdc) | Apply logging guidelines in your development | **Prompt:** `Help me improve logging using the cursor rule @126-java-logging` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
3028

31-
### Testing rules
29+
## Testing rules
3230

3331
| Cursor Rule | Description | Prompt | Notes |
3432
|-------------|-------------|--------|-------|
3533
| [131-java-unit-testing](.cursor/rules/131-java-unit-testing.mdc) | Apply Unit Testing best practices | **Prompt:** `Can improve the unit tests using the cursor rule @131-java-unit-testing` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
3634

37-
### Refactoring rules
35+
## Refactoring rules
3836

3937
| Cursor Rule | Description | Prompt | Notes |
4038
|-------------|-------------|--------|-------|
4139
| [141-java-refactoring-with-modern-features](.cursor/rules/141-java-refactoring-with-modern-features.mdc) | Add Modern Java Features in your development | **Prompt:** `Refactor my code to use modern Java features using the cursor rule @141-java-refactoring-with-modern-features` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | Non conversational cursor rule. |
4240
| [142-java-functional-programming](.cursor/rules/142-java-functional-programming.mdc) | Add Functional Programming style in your development | **Prompt:** `Refactor my code to use functional programming using the cursor rule @142-java-functional-programming` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
4341
| [143-java-data-oriented-programming](.cursor/rules/143-java-data-oriented-programming.mdc) | Add Data Oriented Programmin in your development | **Prompt:** `Refactor my code to use data oriented programming using the cursor rule @143-java-data-oriented-programming` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
4442

45-
### Performance rule (Jmeter)
43+
## Performance rule (Jmeter)
4644

4745
| Activity | Description | Prompt | Notes |
4846
|----------|------|--------|-------|
4947
| [151-java-performance-jmeter](.cursor/rules/151-java-performance-jmeter.mdc) | Run a peformance test with Jmeter | **Prompt:** `Add JMeter performance testing to this project using @151-java-performance-jmeter.mdc` **Note:** You could ask the model to create a JMeter based on a RestController/Resource. Example: `Can you create a Jmeter file based on the restcontroller in the path src/test/resources/jmeter/load-test.jmx?` | This cursor rule is applied automatically without any interaction with the Software engineer. If you create a Jmeter file with the model, review the generation, sometimes it is necessary to hammer a bit. |
5048

51-
### Profiling rules (Async profiler)
49+
## Profiling rules (Async profiler)
5250

5351
| Activity | Description | Prompt | Notes |
5452
|----------|-------------|--------|-------|
@@ -59,4 +57,4 @@ Use the following process to improve the java development in some areas if requi
5957

6058
---
6159

62-
**Note:** This guide is self-contained and portable. Copy it into any Java project to get started with Cursor Rules for Java development.
60+
**Note:** This guide is self-contained and portable. Copy it into any Java project to get started with Cursor Rules for Java development.

CURSOR-RULES-JAVA.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Cursor rules Java
2+
3+
Use the following set of Java Cursor Rules to improve your Java development.
4+
5+
## Build system rules (Maven)
6+
7+
| Cursor Rule | Description | Prompt | Notes |
8+
|-------------|-------------|--------|-------|
9+
| [110-java-maven-best-practices](.cursor/rules/110-java-maven-best-practices.mdc) | Analyze your `pom.xml` and apply Maven best practices | **Prompt:** `Help me to review the pom.xml following the best practices for dependency management and directory structure use the cursor rule @110-java-maven-best-practices` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | This cursor rule is applied automatically without any interaction with the Software engineer. |
10+
| [111-java-maven-deps-and-plugins](.cursor/rules/111-java-maven-deps-and-plugins.mdc) | Update your `pom.xml` with Maven Dependencies & Plugins | **Prompt:** `Can you improve the pom.xml using the cursor rule @111-java-maven-deps-and-plugins` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | Using a Conversational approach, the Software engineer will interact with the cursor rule to update the `pom.xml`. |
11+
| [112-java-maven-documentation](.cursor/rules/112-java-maven-documentation.mdc) | Create a Maven Documentation with the file `README-DEV.md` | **Prompt:** `Generate developer documentation with essential Maven commands using @112-java-maven-documentation` **Note:** Add in the context the `pom.xml` which you want to generate the documentation. | This cursor rule is applied automatically without any interaction with the Software engineer. |
12+
13+
## Design rules
14+
15+
| Cursor Rule | Description | Prompt | Notes |
16+
|-------------|-------------|--------|-------|
17+
| [121-java-object-oriented-design](.cursor/rules/121-java-object-oriented-design.mdc) | Take another point of view with an Object Oriented Design of your development | **Prompt:** `Review my code for object-oriented design using the cursor rule @121-java-object-oriented-design` **Note:** Add in the context a package to improve the design. | This cursor rule is applied automatically without any interaction with the Software engineer. It is an interesting prompt to see what alternatives offer the model for your package. |
18+
| [122-java-type-design](.cursor/rules/122-java-type-design.mdc) | Review the Type Design in your development | **Prompt:** `Help me improve my type design using the cursor rule @122-java-type-design` **Note:** Add in the context a package to improve the design. | This cursor rule is applied automatically without any interaction with the Software engineer. It is an interesting prompt to see what alternatives offer the model for your package. |
19+
20+
## Coding rules
21+
22+
| Cursor Rule | Description | Prompt | Notes |
23+
|-------------|-------------|--------|-------|
24+
| [123-java-general-guidelines](.cursor/rules/123-java-general-guidelines.mdc) | Apply general purpose Java guidelines | **Prompt:** `Review my code for general Java best practices using the cursor rule @123-java-general-guidelines` **Note:** Add a package in the context. | Non conversational cursor rule. |
25+
| [124-java-secure-coding](.cursor/rules/124-java-secure-coding.mdc) | Review your coide with Secure Java Coding rules | **Prompt:** `Check my code for security issues using the cursor rule @124-java-secure-coding` **Note:** Add a package in the context. | Non conversational cursor rule. |
26+
| [125-java-concurrency](.cursor/rules/125-java-concurrency.mdc) | Improve your code with Concurrency rules | **Prompt:** `Review my code for concurrency best practices using the cursor rule @125-java-concurrency` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | Non conversational cursor rule. |
27+
| [126-java-logging](.cursor/rules/126-java-logging.mdc) | Apply logging guidelines in your development | **Prompt:** `Help me improve logging using the cursor rule @126-java-logging` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
28+
29+
## Testing rules
30+
31+
| Cursor Rule | Description | Prompt | Notes |
32+
|-------------|-------------|--------|-------|
33+
| [131-java-unit-testing](.cursor/rules/131-java-unit-testing.mdc) | Apply Unit Testing best practices | **Prompt:** `Can improve the unit tests using the cursor rule @131-java-unit-testing` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
34+
35+
## Refactoring rules
36+
37+
| Cursor Rule | Description | Prompt | Notes |
38+
|-------------|-------------|--------|-------|
39+
| [141-java-refactoring-with-modern-features](.cursor/rules/141-java-refactoring-with-modern-features.mdc) | Add Modern Java Features in your development | **Prompt:** `Refactor my code to use modern Java features using the cursor rule @141-java-refactoring-with-modern-features` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | Non conversational cursor rule. |
40+
| [142-java-functional-programming](.cursor/rules/142-java-functional-programming.mdc) | Add Functional Programming style in your development | **Prompt:** `Refactor my code to use functional programming using the cursor rule @142-java-functional-programming` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
41+
| [143-java-data-oriented-programming](.cursor/rules/143-java-data-oriented-programming.mdc) | Add Data Oriented Programmin in your development | **Prompt:** `Refactor my code to use data oriented programming using the cursor rule @143-java-data-oriented-programming` **Note:** Add a class or package which consider that it could bye improved by the cursor rule. | This cursor rule is applied automatically without any interaction with the Software engineer. |
42+
43+
## Performance rule (Jmeter)
44+
45+
| Activity | Description | Prompt | Notes |
46+
|----------|------|--------|-------|
47+
| [151-java-performance-jmeter](.cursor/rules/151-java-performance-jmeter.mdc) | Run a peformance test with Jmeter | **Prompt:** `Add JMeter performance testing to this project using @151-java-performance-jmeter.mdc` **Note:** You could ask the model to create a JMeter based on a RestController/Resource. Example: `Can you create a Jmeter file based on the restcontroller in the path src/test/resources/jmeter/load-test.jmx?` | This cursor rule is applied automatically without any interaction with the Software engineer. If you create a Jmeter file with the model, review the generation, sometimes it is necessary to hammer a bit. |
48+
49+
## Profiling rules (Async profiler)
50+
51+
| Activity | Description | Prompt | Notes |
52+
|----------|-------------|--------|-------|
53+
| [161-java-profiling-detect](.cursor/rules/161-java-profiling-detect.mdc) | Profile your development in runtime and collect evidences to be analyzed later. | **Prompt:** `My Java application has performance issues - help me set up comprehensive profiling process using @161-java-profiling-detect.mdc and use the location YOUR-DEVELOPMENT/profiler` **Note:** Replace YOUR-DEVELOPMENT with your actual development path. Example: examples/spring-boot-memory-leak-demo/profiler | Non conversational cursor rule. The Cursor rule will generate 2 scripts. One script designed to run your development with the right JVM flags for profiling and the second scripts will ask few questions about what problem do you want to solve/analyze over one particular PID. |
54+
| [162-java-profiling-analyze](.cursor/rules/162-java-profiling-analyze.mdc) | Analyze results from previous step and generate reports with the analysis results.| **Prompt:** `Analyze the results located in YOUR-DEVELOPMENT/profiler and use the cursor rule @162-java-profiling-analyze` **Note:** Replace YOUR-DEVELOPMENT with your actual development path. Example: examples/spring-boot-memory-leak-demo/profiler | Non conversational cursor rule. |
55+
| - | Code Refactoring from suggestions from analysis | `Can you apply the solutions from @profiling-solutions-yyyymmdd.md in @/info to mitigate bottlenecks` | Make a refactoring with the notes from the analysis |
56+
| [164-java-profiling-compare](.cursor/rules/164-java-profiling-compare.mdc) | Compare results comparing results before and after applying changes in the code | **Prompt:** `Review if the problems was solved with last refactoring using the reports located in @/results with the cursor rule 154-java-profiling-compare.mdc` **Note:** Put in the context the folder with the results | This cursor rule is applied automatically without any interaction with the Software engineer. |
57+
58+
---
59+
60+
**Note:** This guide is self-contained and portable. Copy it into any Java project to get started with Cursor Rules for Java development.

0 commit comments

Comments
 (0)