From 1f25ad613f97543b28afc6d6636a30f2d9d4511e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Bre=C3=B1a=20Moral?= Date: Sat, 28 Jun 2025 10:45:39 +0200 Subject: [PATCH 1/3] Adding roles to cursor rules --- .../rules/110-java-maven-best-practices.mdc | 6 ++ .../rules/111-java-maven-deps-and-plugins.mdc | 6 ++ .../rules/112-java-maven-documentation.mdc | 6 ++ .../rules/121-java-object-oriented-design.mdc | 6 ++ .cursor/rules/122-java-type-design.mdc | 6 ++ .cursor/rules/123-java-general-guidelines.mdc | 6 ++ .cursor/rules/124-java-secure-coding.mdc | 6 ++ .cursor/rules/125-java-concurrency.mdc | 6 ++ .cursor/rules/126-java-logging.mdc | 6 ++ .cursor/rules/131-java-unit-testing.mdc | 6 ++ ...-java-refactoring-with-modern-features.mdc | 6 ++ .../rules/142-java-functional-programming.mdc | 6 ++ .../143-java-data-oriented-programming.mdc | 6 ++ .cursor/rules/151-java-profiling-detect.mdc | 20 +++++ .cursor/rules/152-java-profiling-analyze.mdc | 20 +++++ .cursor/rules/154-java-profiling-compare.mdc | 82 ++++++++++++++++--- ...profiling-comparison-analysis-20250628.md} | 0 ...md => profiling-final-results-20250628.md} | 0 ...profiling-comparison-analysis-20250628.md} | 0 ...md => profiling-final-results-20250628.md} | 0 ...=> profiling-problem-analysis-20250628.md} | 0 ...103.md => profiling-solutions-20250628.md} | 0 ...50103.md => profiling-summary-20250628.md} | 0 23 files changed, 190 insertions(+), 10 deletions(-) rename examples/spring-boot-memory-leak-demo/profiler/docs/{profiling-comparison-analysis.md => profiling-comparison-analysis-20250628.md} (100%) rename examples/spring-boot-memory-leak-demo/profiler/docs/{profiling-final-results.md => profiling-final-results-20250628.md} (100%) rename examples/spring-boot-performance-bottleneck-demo/profiler/docs/{profiling-comparison-analysis.md => profiling-comparison-analysis-20250628.md} (100%) rename examples/spring-boot-performance-bottleneck-demo/profiler/docs/{profiling-final-results.md => profiling-final-results-20250628.md} (100%) rename examples/spring-boot-performance-bottleneck-demo/profiler/docs/{profiling-problem-analysis-20250103.md => profiling-problem-analysis-20250628.md} (100%) rename examples/spring-boot-performance-bottleneck-demo/profiler/docs/{profiling-solutions-20250103.md => profiling-solutions-20250628.md} (100%) rename examples/spring-boot-performance-bottleneck-demo/profiler/docs/{profiling-summary-20250103.md => profiling-summary-20250628.md} (100%) diff --git a/.cursor/rules/110-java-maven-best-practices.mdc b/.cursor/rules/110-java-maven-best-practices.mdc index 9e1305c9..1ece680b 100644 --- a/.cursor/rules/110-java-maven-best-practices.mdc +++ b/.cursor/rules/110-java-maven-best-practices.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Maven Best Practices +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Effective Maven usage involves robust dependency management via `` and BOMs, adherence to the standard directory layout, and centralized plugin management. Build profiles should be used for environment-specific configurations. POMs must be kept readable and maintainable with logical structure and properties for versions. Custom repositories should be declared explicitly and their use minimized, preferably managed via a central repository manager. ## Table of contents diff --git a/.cursor/rules/111-java-maven-deps-and-plugins.mdc b/.cursor/rules/111-java-maven-deps-and-plugins.mdc index 62d5c7ea..4d2a28c4 100644 --- a/.cursor/rules/111-java-maven-deps-and-plugins.mdc +++ b/.cursor/rules/111-java-maven-deps-and-plugins.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Update pom.xml to add Maven dependencies & plugins +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + This rule provides a comprehensive, conversational approach to updating Maven pom.xml files with properties, dependencies, plugins, and profiles. It MUST ask questions first to understand the project needs and then conditionally add only relevant components. **⚠️ CRITICAL: NO CACHING OF QUESTIONS ⚠️** diff --git a/.cursor/rules/112-java-maven-documentation.mdc b/.cursor/rules/112-java-maven-documentation.mdc index 1daaeded..9a0ce07a 100644 --- a/.cursor/rules/112-java-maven-documentation.mdc +++ b/.cursor/rules/112-java-maven-documentation.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Create README-DEV.md with information about how to use the Maven project +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + When creating a README-DEV.md file for a Maven project, include ONLY the following sections with the specified Maven goals. Do NOT add any additional sections, explanations, or content beyond what is explicitly listed below. ## STRICT Structure for README-DEV.md (Template): diff --git a/.cursor/rules/121-java-object-oriented-design.mdc b/.cursor/rules/121-java-object-oriented-design.mdc index 09de0417..0adffc05 100644 --- a/.cursor/rules/121-java-object-oriented-design.mdc +++ b/.cursor/rules/121-java-object-oriented-design.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java Object-Oriented Design Guidelines +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + This document provides comprehensive guidelines for robust Java object-oriented design and refactoring. It emphasizes core principles like SOLID, DRY, and YAGNI, best practices for class and interface design including favoring composition over inheritance and designing for immutability. The rules also cover mastering encapsulation, inheritance, and polymorphism, and finally, identifying and refactoring common object-oriented design code smells such as God Classes, Feature Envy, and Data Clumps to promote maintainable, flexible, and understandable code. ## Implementing These Principles diff --git a/.cursor/rules/122-java-type-design.mdc b/.cursor/rules/122-java-type-design.mdc index 1e7f6fc5..5b1969e3 100644 --- a/.cursor/rules/122-java-type-design.mdc +++ b/.cursor/rules/122-java-type-design.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Type Design Thinking in Java +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Type design thinking in Java applies typography principles to code structure and organization. Just as typography creates readable, accessible text, thoughtful type design in Java produces maintainable, comprehensible code. ## Implementing These Principles diff --git a/.cursor/rules/123-java-general-guidelines.mdc b/.cursor/rules/123-java-general-guidelines.mdc index 60a011a6..a02f8328 100644 --- a/.cursor/rules/123-java-general-guidelines.mdc +++ b/.cursor/rules/123-java-general-guidelines.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java General Guidelines +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + This document outlines general Java coding guidelines covering fundamental aspects such as naming conventions for packages, classes, methods, variables, and constants; code formatting rules including indentation, line length, brace style, and whitespace usage; standards for organizing import statements; best practices for Javadoc documentation; and comprehensive error and exception handling with a strong focus on security, including avoiding sensitive information exposure, catching specific exceptions, and secure resource management. ## Implementing These Principles diff --git a/.cursor/rules/124-java-secure-coding.mdc b/.cursor/rules/124-java-secure-coding.mdc index 562a25ec..053c2d55 100644 --- a/.cursor/rules/124-java-secure-coding.mdc +++ b/.cursor/rules/124-java-secure-coding.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java Secure coding guidelines +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + This document provides essential Java secure coding guidelines, focusing on five key areas: validating all untrusted inputs to prevent attacks like injection and path traversal; protecting against injection attacks (e.g., SQL injection) by using parameterized queries or prepared statements; minimizing the attack surface by adhering to the principle of least privilege and reducing exposure; employing strong, current cryptographic algorithms for hashing, encryption, and digital signatures while avoiding deprecated ones; and handling exceptions securely by avoiding the exposure of sensitive information in error messages to users and logging detailed, non-sensitive diagnostic information for developers. ## Implementing These Principles diff --git a/.cursor/rules/125-java-concurrency.mdc b/.cursor/rules/125-java-concurrency.mdc index 367659d2..92a949f6 100644 --- a/.cursor/rules/125-java-concurrency.mdc +++ b/.cursor/rules/125-java-concurrency.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java rules for Concurrency objects +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Effective Java concurrency relies on understanding thread safety fundamentals, using `java.util.concurrent` utilities, and managing thread pools with `ExecutorService`. Key practices include implementing concurrent design patterns like Producer-Consumer, leveraging `CompletableFuture` for asynchronous tasks, and ensuring thread safety through immutability and safe publication. Performance aspects like lock contention and memory consistency must be considered. Thorough testing, including stress tests and thread dump analysis, is crucial. Modern Java offers virtual threads for enhanced scalability, structured concurrency for simplified task management, and scoped values for safer thread-shared data as alternatives to thread-locals. ## Implementing These Principles diff --git a/.cursor/rules/126-java-logging.mdc b/.cursor/rules/126-java-logging.mdc index f855d4b5..a4e03e38 100644 --- a/.cursor/rules/126-java-logging.mdc +++ b/.cursor/rules/126-java-logging.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java Logging Best Practices +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Effective Java logging involves selecting a standard framework (SLF4J with Logback/Log4j2), using appropriate log levels (ERROR, WARN, INFO, DEBUG, TRACE), and adhering to core practices like parameterized logging, proper exception handling, and avoiding sensitive data exposure. Configuration should be environment-specific with clear output formats. diff --git a/.cursor/rules/131-java-unit-testing.mdc b/.cursor/rules/131-java-unit-testing.mdc index a0143a5c..aaa89c0e 100644 --- a/.cursor/rules/131-java-unit-testing.mdc +++ b/.cursor/rules/131-java-unit-testing.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java Unit testing guidelines +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Effective Java unit testing involves using JUnit 5 annotations and AssertJ for fluent assertions. Tests should follow the Given-When-Then structure with descriptive names for clarity. Each test must have a single responsibility, be independent, and leverage parameterized tests for data variations. Mocking dependencies with frameworks like Mockito is crucial for isolating the unit under test. While code coverage is a useful guide, the focus should be on meaningful tests for critical logic and edge cases. Test classes and methods should typically be package-private. Strategies for code splitting include small test methods and helper functions. Anti-patterns like testing implementation details, hard-coded values, and ignoring failures should be avoided. Proper state management involves isolated state and immutable objects, and error handling should include testing for expected exceptions and their messages. ## Implementing These Principles diff --git a/.cursor/rules/141-java-refactoring-with-modern-features.mdc b/.cursor/rules/141-java-refactoring-with-modern-features.mdc index b7865f4a..a81dc54e 100644 --- a/.cursor/rules/141-java-refactoring-with-modern-features.mdc +++ b/.cursor/rules/141-java-refactoring-with-modern-features.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Modern Java Development Guidelines (Java 8+) +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Modern Java development (Java 8+) emphasizes leveraging lambda expressions and functional interfaces over anonymous classes, and using the Stream API for declarative collection processing. The `Optional` API should be used for handling potentially absent values gracefully, and the `java.time` API for all date/time operations. Default methods allow non-breaking interface evolution. Local Variable Type Inference (`var`) can improve readability when used judiciously. Unmodifiable collection factory methods (`List.of()`, etc.) provide concise immutable collections. `CompletableFuture` facilitates composable asynchronous programming. The Java Platform Module System (JPMS, Java 9+) enables strong encapsulation. Performance implications of new features should be considered and profiled. Testing strategies need to adapt to these modern features, and text blocks (Java 15+) offer improved readability for multi-line strings. ## Implementing These Principles diff --git a/.cursor/rules/142-java-functional-programming.mdc b/.cursor/rules/142-java-functional-programming.mdc index 14d8a752..f0e0da6a 100644 --- a/.cursor/rules/142-java-functional-programming.mdc +++ b/.cursor/rules/142-java-functional-programming.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java Functional Programming rules +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Java functional programming revolves around immutable objects and state transformations, ensuring functions are pure (no side effects, depend only on inputs). It leverages functional interfaces, concise lambda expressions, and the Stream API for collection processing. Core paradigms include function composition, `Optional` for null safety, and higher-order functions. Modern Java features like Records enhance immutable data transfer, while pattern matching (for `instanceof` and `switch`) and switch expressions improve conditional logic. Sealed classes and interfaces enable controlled, exhaustive hierarchies, and upcoming Stream Gatherers will offer advanced custom stream operations. ## Implementing These Principles diff --git a/.cursor/rules/143-java-data-oriented-programming.mdc b/.cursor/rules/143-java-data-oriented-programming.mdc index cb97b044..dd7ac43b 100644 --- a/.cursor/rules/143-java-data-oriented-programming.mdc +++ b/.cursor/rules/143-java-data-oriented-programming.mdc @@ -5,6 +5,12 @@ alwaysApply: false --- # Java rules to apply data oriented programming style +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + Java Data-Oriented Programming emphasizes separating code (behavior) from data structures, which should ideally be immutable (e.g., using records). Data manipulation should occur via pure functions that transform data into new instances. It's often beneficial to keep data structures flat and denormalized (using IDs for references) where appropriate, and to start with generic data representations (like `Map`) converting to specific types only when necessary. Data integrity is ensured through pure validation functions. Flexible, generic data access layers facilitate working with various data types and storage mechanisms. All data transformations should be explicit, traceable, and composed of clear, pure functional steps. ## Implementing These Principles diff --git a/.cursor/rules/151-java-profiling-detect.mdc b/.cursor/rules/151-java-profiling-detect.mdc index 6d8e81f6..12b21fba 100644 --- a/.cursor/rules/151-java-profiling-detect.mdc +++ b/.cursor/rules/151-java-profiling-detect.mdc @@ -5,6 +5,26 @@ alwaysApply: false --- # Java Profiling Workflow / Step 1 / Collect data to measure potential issues +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + +This cursor rule provides a comprehensive Java application profiling framework designed to detect and measure performance issues systematically. It serves as the first step in a structured profiling workflow, focusing on data collection and problem identification using async-profiler v4.0. + +The rule automates the entire profiling setup process, from detecting running Java processes to downloading and configuring the appropriate profiler tools for your system. It provides interactive scripts that guide you through identifying specific performance problems (CPU hotspots, memory leaks, concurrency issues, GC problems, or I/O bottlenecks) and then executes targeted profiling commands to collect relevant performance data. + +Key capabilities include: +- **Automated Environment Setup**: Detects OS/architecture and downloads async-profiler v4.0 automatically +- **Problem-Driven Profiling**: Guides users through identifying specific performance issues before profiling +- **Interactive Workflow**: Provides menu-driven interface for selecting appropriate profiling strategies +- **Comprehensive Data Collection**: Supports CPU profiling, memory allocation tracking, lock contention analysis, GC monitoring, and I/O bottleneck detection +- **Modern Tooling**: Leverages async-profiler v4.0 features including interactive heatmaps, native memory leak detection, and enhanced JFR conversion +- **Organized Results**: Maintains clean directory structure with timestamped results for easy analysis and comparison + +The rule ensures consistent, repeatable profiling procedures while providing the flexibility to target specific performance concerns based on your application's behavior and suspected issues. + ## ⚠️ CRITICAL INSTRUCTION FOR AI ASSISTANTS ⚠️ **WHEN USING THE PROFILING SCRIPT TEMPLATE:** diff --git a/.cursor/rules/152-java-profiling-analyze.mdc b/.cursor/rules/152-java-profiling-analyze.mdc index c5b6e822..f84a906e 100644 --- a/.cursor/rules/152-java-profiling-analyze.mdc +++ b/.cursor/rules/152-java-profiling-analyze.mdc @@ -5,6 +5,26 @@ alwaysApply: false --- # Java Profiling Workflow / Step 2 / Analyze profiling data +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + +This cursor rule provides a systematic approach to analyzing Java profiling data collected during the detection phase. It serves as the second step in the structured profiling workflow, focusing on interpreting profiling results, identifying root causes, and documenting findings with actionable solutions. + +The rule establishes a comprehensive analysis framework that transforms raw profiling data into meaningful insights. It guides users through systematically examining flamegraphs, memory allocation patterns, CPU hotspots, and threading issues to identify performance bottlenecks and their underlying causes. + +Key capabilities include: +- **Systematic Analysis Framework**: Structured approach to examining different types of profiling data (CPU, memory, threading, GC) +- **Problem Categorization**: Clear methodology for classifying issues by severity, impact, and type (memory leaks, CPU hotspots, threading problems) +- **Evidence Documentation**: Standardized templates for documenting findings with specific references to profiling files and quantitative metrics +- **Solution Development**: Framework for creating prioritized, actionable recommendations with implementation effort estimates +- **Cross-Correlation Analysis**: Techniques for correlating multiple profiling results and identifying patterns across different time periods +- **Impact Assessment**: Scoring system for prioritizing fixes based on performance impact and implementation effort + +The rule ensures that profiling data is analyzed consistently and thoroughly, with findings documented in a format that enables effective communication with development teams and systematic tracking of performance improvements. + ## Project Organization The profiling setup uses a clean folder structure with everything contained in the profiler directory: diff --git a/.cursor/rules/154-java-profiling-compare.mdc b/.cursor/rules/154-java-profiling-compare.mdc index ea01f508..33746526 100644 --- a/.cursor/rules/154-java-profiling-compare.mdc +++ b/.cursor/rules/154-java-profiling-compare.mdc @@ -5,6 +5,27 @@ alwaysApply: false --- # Java Profiling Workflow / Step 4 / Compare results after refactoring +## System prompt characterization + +Role definition: You are a Senior software engineer with extensive experience in Java software development + +## Description + +This cursor rule provides a comprehensive methodology for comparing Java profiling results before and after performance optimizations or refactoring efforts. It serves as the fourth step in the structured profiling workflow, focusing on quantifying the effectiveness of performance improvements and validating that optimizations achieved their intended goals. + +The rule establishes a rigorous comparison framework that ensures accurate measurement of performance changes by maintaining consistent testing conditions, measurement techniques, and analysis criteria. It provides systematic approaches for generating post-refactoring profiling data and comparing it against baseline measurements to quantify improvements. + +Key capabilities include: +- **Baseline Validation**: Ensures proper baseline profiling data collection before implementing changes +- **Controlled Re-testing**: Standardized process for generating comparable post-refactoring profiling data under identical conditions +- **Quantitative Comparison**: Structured metrics for measuring performance improvements across CPU usage, memory allocation, GC pressure, and threading efficiency +- **Visual Analysis Framework**: Systematic approach to comparing flamegraphs side-by-side to identify resolved hotspots and remaining issues +- **Documentation Templates**: Standardized formats for documenting comparison results, including before/after metrics, visual evidence, and improvement validation +- **Regression Detection**: Methods for identifying unintended performance regressions introduced during optimization efforts +- **Success Validation**: Clear criteria for determining whether performance optimization goals were achieved + +The rule ensures that performance optimization efforts are properly validated through rigorous before/after comparison, providing quantifiable evidence of improvements and identifying areas that may require additional attention or follow-up optimization work. + ## Project Organization The profiling setup uses a clean folder structure with everything contained in the profiler directory: @@ -18,8 +39,8 @@ your-project/ │ ├── *.html # ← Flamegraph files │ └── *.jfr # ← JFR recording files ├── docs/ # ← Analysis documentation - │ ├── profiling-comparison-analysis.md - │ └── profiling-final-results.md + │ ├── profiling-comparison-analysis-YYYYMMDD.md + │ └── profiling-final-results-YYYYMMDD.md ├── current/ # ← Symlink to current profiler version └── async-profiler-*/ # ← Downloaded profiler binaries ``` @@ -112,13 +133,16 @@ open profiler/results/memory-leak-*after*.html ### Phase 4: Documentation Creation +**Note**: All documentation files are created with date suffixes (YYYYMMDD format) to enable tracking multiple profiling sessions and maintain historical analysis records. + #### Step 1: Create Comparison Analysis Document ```bash -# Create the comparison analysis document -touch profiler/docs/profiling-comparison-analysis.md +# Create the comparison analysis document with date suffix +DATE_SUFFIX=$(date +%Y%m%d) +touch profiler/docs/profiling-comparison-analysis-${DATE_SUFFIX}.md ``` -Template for `profiler/docs/profiling-comparison-analysis.md`: +Template for `profiler/docs/profiling-comparison-analysis-YYYYMMDD.md`: ```markdown # Profiling Comparison Analysis - [Date] @@ -161,7 +185,45 @@ Template for `profiler/docs/profiling-comparison-analysis.md`: #### Step 2: Create Final Results Summary ```bash -touch profiler/docs/profiling-final-results.md +# Create the final results summary document with date suffix +DATE_SUFFIX=$(date +%Y%m%d) +touch profiler/docs/profiling-final-results-${DATE_SUFFIX}.md +``` + +Template for `profiler/docs/profiling-final-results-YYYYMMDD.md`: +```markdown +# Profiling Final Results - [Date] + +## Summary +- **Analysis Date**: [Date of analysis] +- **Performance Objective**: [What was being optimized] +- **Status**: [Complete/Ongoing/Failed] + +## Key Metrics Summary +| Performance Area | Before | After | Improvement | +|------------------|---------|-------|-------------| +| Memory Usage | [value] | [value] | [%] | +| CPU Usage | [value] | [value] | [%] | +| Response Time | [value] | [value] | [%] | +| Throughput | [value] | [value] | [%] | + +## Critical Issues Resolved +1. **[Issue Name]**: [Description and resolution] +2. **[Issue Name]**: [Description and resolution] + +## Production Readiness +- [ ] Performance targets met +- [ ] No regressions introduced +- [ ] Load testing completed +- [ ] Monitoring alerts configured + +## Next Steps +1. [Action item 1] +2. [Action item 2] + +## Related Documents +- Analysis: `profiling-comparison-analysis-YYYYMMDD.md` +- Reports: `../results/[report-files]` ``` ### Phase 5: Troubleshooting Missing Reports @@ -256,8 +318,8 @@ ls profiler/results/ | grep -E "(after|refactoring)" | wc -l # Should be > 0 - [ ] Visual evidence documented with specific file references ### Documentation Deliverables -- [ ] `profiler/docs/profiling-comparison-analysis.md` created -- [ ] `profiler/docs/profiling-final-results.md` created +- [ ] `profiler/docs/profiling-comparison-analysis-YYYYMMDD.md` created +- [ ] `profiler/docs/profiling-final-results-YYYYMMDD.md` created - [ ] Quantified performance improvements documented - [ ] Recommendations for production deployment provided - [ ] Ongoing monitoring strategy defined @@ -268,8 +330,8 @@ ls profiler/results/ | grep -E "(after|refactoring)" | wc -l # Should be > 0 echo "=== COMPARISON READINESS CHECK ===" echo "Baseline reports: $(ls profiler/results/*baseline* 2>/dev/null | wc -l)" echo "After reports: $(ls profiler/results/*after* 2>/dev/null | wc -l)" -echo "Analysis docs: $(ls profiler/docs/profiling-*analysis* 2>/dev/null | wc -l)" -echo "Final results: $(ls profiler/docs/profiling-final* 2>/dev/null | wc -l)" +echo "Analysis docs: $(ls profiler/docs/profiling-comparison-analysis-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].md 2>/dev/null | wc -l)" +echo "Final results: $(ls profiler/docs/profiling-final-results-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].md 2>/dev/null | wc -l)" ``` ## Quick Start Commands diff --git a/examples/spring-boot-memory-leak-demo/profiler/docs/profiling-comparison-analysis.md b/examples/spring-boot-memory-leak-demo/profiler/docs/profiling-comparison-analysis-20250628.md similarity index 100% rename from examples/spring-boot-memory-leak-demo/profiler/docs/profiling-comparison-analysis.md rename to examples/spring-boot-memory-leak-demo/profiler/docs/profiling-comparison-analysis-20250628.md diff --git a/examples/spring-boot-memory-leak-demo/profiler/docs/profiling-final-results.md b/examples/spring-boot-memory-leak-demo/profiler/docs/profiling-final-results-20250628.md similarity index 100% rename from examples/spring-boot-memory-leak-demo/profiler/docs/profiling-final-results.md rename to examples/spring-boot-memory-leak-demo/profiler/docs/profiling-final-results-20250628.md diff --git a/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-comparison-analysis.md b/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-comparison-analysis-20250628.md similarity index 100% rename from examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-comparison-analysis.md rename to examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-comparison-analysis-20250628.md diff --git a/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-final-results.md b/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-final-results-20250628.md similarity index 100% rename from examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-final-results.md rename to examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-final-results-20250628.md diff --git a/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-problem-analysis-20250103.md b/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-problem-analysis-20250628.md similarity index 100% rename from examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-problem-analysis-20250103.md rename to examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-problem-analysis-20250628.md diff --git a/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-solutions-20250103.md b/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-solutions-20250628.md similarity index 100% rename from examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-solutions-20250103.md rename to examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-solutions-20250628.md diff --git a/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-summary-20250103.md b/examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-summary-20250628.md similarity index 100% rename from examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-summary-20250103.md rename to examples/spring-boot-performance-bottleneck-demo/profiler/docs/profiling-summary-20250628.md From ede50ce190d4b42710bfb7f1a8bb4f6d2968ccc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Bre=C3=B1a=20Moral?= Date: Sat, 28 Jun 2025 10:49:55 +0200 Subject: [PATCH 2/3] Minor update in README --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 1289ccfb..4bd76a44 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,6 @@ Modern Java IDEs, such as **Cursor AI**, provide ways to customize how the `Agen A system prompt is a set of instructions given to an AI model that defines how it should behave, what role it should take on, and what guidelines it should follow when responding to users. Think of it as the "operating manual" that shapes the AI's personality, capabilities, and boundaries. -System prompts typically include: - -- Behavioral guidelines - How the AI should communicate (formal vs casual, helpful vs neutral, etc.) -- Role definition - What the AI is supposed to be (assistant, tutor, creative writer, etc.) -- Capabilities and limitations - What the AI can and cannot do -- Safety rules - What topics or requests to avoid -- Response formatting - How to structure answers, when to use lists, etc. -- Context and background - Any relevant information about the AI's purpose or the situation - ## How to use the Cursor rules? Using the Cursor rules is straightforward: simply `drag and drop` the cursor rule that you need into the chat textbox where you are typing your `User prompt`. Currently, the cursor rules are released with a [manual scope](https://docs.cursor.com/context/rules#rule-type) on purpose by design to mitigate potential negative performance impact in communications with Cursor platform. From eab36944ddf5859d5a8c43e780f789f3b0a814f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20Bre=C3=B1a=20Moral?= Date: Sat, 28 Jun 2025 11:08:07 +0200 Subject: [PATCH 3/3] Minor update in README --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bd76a44..7dfc3a92 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ A system prompt is a set of instructions given to an AI model that defines how i ## How to use the Cursor rules? -Using the Cursor rules is straightforward: simply `drag and drop` the cursor rule that you need into the chat textbox where you are typing your `User prompt`. Currently, the cursor rules are released with a [manual scope](https://docs.cursor.com/context/rules#rule-type) on purpose by design to mitigate potential negative performance impact in communications with Cursor platform. +Using the Cursor rules is straightforward: simply `drag and drop` the cursor rule that you need into the chat textbox where you are typing your `User prompt`. + +⚠️ Currently, the cursor rules are released with the [manual scope](https://docs.cursor.com/context/rules#rule-type) on purpose by design to mitigate potential negative performance impact in communications with **The Cursor platform**. ## Cursor Rules