Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .cursor/rules/100-java-system-prompt-java-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ Use the following collection of System prompts of Java to improve your Java deve

| Cursor Rule | Description | Prompt | Notes |
|----|----|----|----|
| [123-java-general-guidelines](.cursor/rules/123-java-general-guidelines.md) | Apply general purpose Java guidelines | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @123-java-general-guidelines` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @123-java-general-guidelines with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [123-java-exception-handling](.cursor/rules/123-java-exception-handling.md) | Add Exception handling | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @123-java-exception-handling` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @123-java-exception-handling with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [124-java-secure-coding](.cursor/rules/124-java-secure-coding.md) | Review my code for Secure Java Coding rules | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @124-java-secure-coding` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @124-java-secure-coding with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [125-java-concurrency](.cursor/rules/125-java-concurrency.md) | Improve your code with Concurrency rules | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @125-java-concurrency` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @125-java-concurrency with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [126-java-logging](.cursor/rules/126-java-logging.md) | Apply logging guidelines in your development | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @126-java-logging` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @126-java-logging with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [127-java-exception-handling](.cursor/rules/127-java-exception-handling.md) | Add Exception handling | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @127-java-exception-handling` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @127-java-exception-handling with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [128-java-generics](.cursor/rules/128-java-generics.md) | Apply generics in a class | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @128-java-generics` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @128-java-generics with the behaviour @behaviour-consultative-interaction` **User Prompt with Training behaviour:** `Create a course about @128-java-generics.md using the behavior @behaviour-progressive-learning.md and put the course here` **Note:** Add in the context the location to add the course. | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |

## Testing rules
Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/112-java-maven-plugins.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: 112-java-maven-plugins
description: Use when you need to add or configure Maven plugins in your pom.xml using a modular, step-based approach.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
version: 0.12.0-SNAPSHOT
---
# Update pom.xml to add Maven plugins with modular step-based configuration
# Maven Plugins: pom.xml Configuration Best Practices

## Role

Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/113-java-maven-documentation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: 113-java-maven-documentation
description: Use when you need to create a DEVELOPER.md file for a Maven project documenting plugin goals, Maven profiles, and submodules.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
version: 0.12.0-SNAPSHOT
---
# Create DEVELOPER.md with information about how to use the Maven project
# Create DEVELOPER.md for the Maven projects

## Role

Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/121-java-object-oriented-design.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 121-java-object-oriented-design
description: Use when you need to review, improve, or refactor Java code for object-oriented design quality — applying SOLID, DRY, and YAGNI principles, improving class and interface design, fixing OOP misuse, and resolving common code smells such as God Class, Feature Envy, and Data Clumps.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/122-java-type-design.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 122-java-type-design
description: Use when you need to review, improve, or refactor Java code for type design quality — including establishing clear type hierarchies, applying consistent naming conventions, eliminating primitive obsession with domain-specific value objects, leveraging generic type parameters, creating type-safe wrappers, designing fluent interfaces, ensuring precision-appropriate numeric types (BigDecimal for financial calculations), and improving type contrast through interfaces and method signature alignment.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 127-java-exception-handling
name: 123-java-exception-handling
description: Use when you need to apply Java exception handling best practices — including using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs early with fail-fast principles, handling thread interruption correctly, documenting exceptions with @throws, enforcing logging policy, translating exceptions at API boundaries, managing retries and idempotency, enforcing timeouts, attaching suppressed exceptions, and propagating failures in async/reactive code.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/124-java-secure-coding.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 124-java-secure-coding
description: Use when you need to apply Java secure coding best practices — including validating untrusted inputs, defending against injection attacks with parameterized queries, minimizing attack surface via least privilege, applying strong cryptographic algorithms, handling exceptions securely without exposing sensitive data, managing secrets at runtime, avoiding unsafe deserialization, and encoding output to prevent XSS.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/125-java-concurrency.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 125-java-concurrency
description: Use when you need to apply Java concurrency best practices — including thread safety fundamentals, ExecutorService thread pool management, concurrent design patterns like Producer-Consumer, asynchronous programming with CompletableFuture, immutability and safe publication, deadlock avoidance, virtual threads and structured concurrency, scoped values, backpressure, cancellation discipline, and observability for concurrent systems.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/128-java-generics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 128-java-generics
description: Use when you need to review, improve, or refactor Java code for generics quality — including avoiding raw types, applying PECS wildcards, using bounded type parameters, designing effective generic methods, leveraging type inference with the diamond operator, handling type erasure, preventing heap pollution with @SafeVarargs, and integrating generics with Records, sealed types, and pattern matching.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/131-java-unit-testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 131-java-unit-testing
description: Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify null-safety annotations, or eliminating testing anti-patterns such as reflection-based tests or shared mutable state.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/132-java-integration-testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 132-java-integration-testing
description: Use when you need to set up, review, or improve Java integration tests — including generating a BaseIntegrationTest.java with WireMock for HTTP stubs, detecting HTTP client infrastructure from import signals, injecting service coordinates dynamically via System.setProperty(), creating WireMock JSON mapping files with bodyFileName, isolating stubs per test method, verifying HTTP interactions, or eliminating anti-patterns such as Mockito-mocked HTTP clients or globally registered WireMock stubs.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 141-java-refactoring-with-modern-features
description: Use when you need to refactor Java code to adopt modern Java features (Java 8+) including lambda expressions, Stream API, Optional, java.time API, collection factory methods, CompletableFuture, text blocks, var inference, and Java 25 flexible constructor bodies and module import declarations.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/142-java-functional-programming.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 142-java-functional-programming
description: Use when you need to apply functional programming principles in Java — including immutable objects and Records, pure functions, functional interfaces, lambda expressions, Stream API, Optional for null safety, function composition, higher-order functions, pattern matching, sealed classes/interfaces, and concurrent-safe functional patterns.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/143-java-functional-exception-handling.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: 143-java-functional-exception-handling
description: Use when you need to apply functional exception handling best practices in Java — including replacing exception overuse with Optional and VAVR Either types, designing error type hierarchies using sealed classes and enums, implementing monadic error composition pipelines, establishing functional control flow patterns, and reserving exceptions only for truly exceptional system-level failures.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
version: 0.12.0-SNAPSHOT
---
# Java Exceptions Best Practices
# Java Functional Exception handling Best Practices

## Role

Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/144-java-data-oriented-programming.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: 144-java-data-oriented-programming
description: Use when you need to apply data-oriented programming best practices in Java — including separating code (behavior) from data structures using records, designing immutable data with pure transformation functions, keeping data flat and denormalized with ID-based references, starting with generic data structures converting to specific types when needed, ensuring data integrity through pure validation functions, and creating flexible generic data access layers.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
version: 0.12.0-SNAPSHOT
---
# Java rules to apply data oriented programming style
# Java Data-Oriented Programming Best Practices

## Role

Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/170-java-documentation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 170-java-documentation
description: Use when you need to generate or improve Java project documentation — including README.md files, package-info.java files, Javadoc enhancements, and Architecture Decision Records (ADRs) — through a modular, step-based interactive process that adapts to your specific documentation needs.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/171-java-diagrams.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 171-java-diagrams
description: Use when you need to generate Java project diagrams — including UML sequence diagrams, UML class diagrams, C4 model diagrams, and UML state machine diagrams — through a modular, step-based interactive process that adapts to your specific visualization needs.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
1 change: 1 addition & 0 deletions .cursor/rules/172-java-agents.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: 172-java-agents
description: Use when you need to generate an AGENTS.md file for a Java repository — covering project conventions, tech stack, file structure, commands, Git workflow, and contributor boundaries — through a modular, step-based interactive process that adapts to your specific project needs.
license: Apache-2.0
metadata:
author: Juan Antonio Breña Moral
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You are an expert Java developer and technical writer for this project.
./mvnw clean install -pl skills-generator

# Validate agent skills
npx skill-check .agents/skills
npx skill-check skills

# Serve the website locally
jwebserver -p 8000 -d "$(pwd)/docs"
Expand Down
3 changes: 1 addition & 2 deletions SYSTEM-PROMPTS-JAVA.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ Use the following collection of System prompts of Java to improve your Java deve

| Cursor Rule | Description | Prompt | Notes |
|----|----|----|-----|
| [123-java-general-guidelines](.cursor/rules/123-java-general-guidelines.md) | Apply general purpose Java guidelines | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @123-java-general-guidelines` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @123-java-general-guidelines with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [123-java-exception-handling](.cursor/rules/123-java-exception-handling.md) | Add Exception handling | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @123-java-exception-handling` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @123-java-exception-handling with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [124-java-secure-coding](.cursor/rules/124-java-secure-coding.md) | Review my code for Secure Java Coding rules | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @124-java-secure-coding` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @124-java-secure-coding with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [125-java-concurrency](.cursor/rules/125-java-concurrency.md) | Improve your code with Concurrency rules | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @125-java-concurrency` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @125-java-concurrency with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [126-java-logging](.cursor/rules/126-java-logging.md) | Apply logging guidelines in your development | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @126-java-logging` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @126-java-logging with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [127-java-exception-handling](.cursor/rules/127-java-exception-handling.md) | Add Exception handling | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @127-java-exception-handling` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @127-java-exception-handling with the behaviour @behaviour-consultative-interaction` | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |
| [128-java-generics](.cursor/rules/128-java-generics.md) | Apply generics in a class | **User Prompt:** `Improve the class/classes added in the context applying the system prompt @128-java-generics` (Example) **Note:** Add in the context a class/classes. **User Prompt with Consultative Interactive Behaviour:** `Improve the class/classes added in the context applying the system prompt @128-java-generics with the behaviour @behaviour-consultative-interaction` **User Prompt with Training behaviour:** `Create a course about @128-java-generics.md using the behavior @behaviour-progressive-learning.md and put the course here` **Note:** Add in the context the location to add the course. | You can use the System prompt in a purist way or add the Behaviours to customize the final behaviour. |

## Testing rules
Expand Down
8 changes: 8 additions & 0 deletions documentation/MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ git tag --list
git tag 0.11.0
git push --tags
```

---

## Add a new Skills

```bash
review if exist a new id in @skills-generator/src/main/resources/skill-inventory.json to review compare with the content of @skills-generator/src/main/resources/skills and if exist add a new skill summary in @skills-generator/src/main/resources/skills . to elaborate the skill review the content of the id with @system-prompts-generator/src/main/resources/system-prompts when finish, validate generation with @/Users/jabrena/.cursor/projects/Users-jabrena-IdeaProjects-java-cursor-rules/terminals/1.txt:69-70 and validate the skill with npx skill-check skills
```
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<logback.version>1.5.18</logback.version>
<junit.version>5.13.3</junit.version>
<assertj.version>3.27.3</assertj.version>
<jackson.version>2.18.2</jackson.version>

<!-- Core build plugin versions -->
<maven-plugin-compiler.version>3.14.0</maven-plugin-compiler.version>
Expand Down Expand Up @@ -78,6 +79,11 @@
<artifactId>cursor-rules-java-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Loading
Loading