The power of Cursor rules in Java Enterprise development

Juan Antonio Breña Moral

Stenographic Figure, Jackson Pollock (1943)
Museum of Modern Art (MoMA)
Abstract expressionism

Who I am

Juan Antonio Breña Moral
Software Engineering Manager @ Capital One, C1

Twitter | Github | LinkedIn
"Make it work, make it right, make it fast."
- Kent Beck

"Lead me, follow me, or get out of my way.",
"Pressure makes diamonds."
- George S. Patton Jr.
Source: Leavitt's Alignment Model (1965) >> People, Process and Technology Framework

Agenda (30 min)

  • Introduction
  • WH Questions
  • Demo
  • Where is works?
  • References
  • Feedback
  • Q&A

Slides

                            
                                jbang trust list
                                jbang cache clear
                                jbang catalog list jabrena
                                jbang qr-code@jabrena \
                                --url https://jabrena.github.io/cursor-rules-java/dvbe25/
                            
                        

Introduction

Software Development workflow & Data Pipelines has evolved with the raise of AI tools enhancements.

Introduction

For Software Engineers: AS IS

Introduction

For Software Engineers: TO BE

Source: Cursor AI

Introduction

For Data Pipelines: AS IS

Introduction

For Data Pipelines: TO BE

Source: Cursor CLI

Introduction

For Data Pipelines: TO BE (II)

Source: Cursor Background Agent

Introduction

So... How to help Software Engineer & Data Pipelines to reduce ambiguity and improve the results of the different workflows?

Introduction

Answer:
Use System prompts.

WH Questions

about System prompts

What is a Prompt?

A prompt is an instruction, question, or input given to an AI system to generate a response. It's essentially how you communicate with AI to get it to do what you want.

Example:


                            Can you create a JMH benchmark
                            in order to know what is the best implementation?
                        

What is a Prompt?

A prompt could be enahanced with the help of a system prompt or a context.

What is a System prompt?

A system prompt is a set of instructions given to an AI model that defines how it should behave. Think of it as the "operating manual" that shapes the AI's personality, capabilities, and boundaries.

What is a System prompt?

A system prompt can include the following elements:

Role Context Goal
Constraints Instructions Examples
Output format Safeguards Metadata

Valid for:
Anthropic Claude Sonnet, OpenAI ChatGPT, Google Gemini & xAI Grok.

What is a System prompt?

Examples:

128-java-generics.md
131-java-unit-testing.md
2003-agile-create-user-story.mdc
2006-adr-create-functional-requirements-for-rest-api-development.mdc

Why use System prompts?

System prompts can help Engineering teams reduce ambiguity in the way that models answer their questions while increasing the homogeneity and consistency of results across different interactions and team members.

When use System prompts?

  • Daily when the software engineer use Pair programming.
  • In Data Pipelines, refactoring the repositories applying Code Standards.
  • In Data Pipelines, updating documentation.
  • In Data Pipelines, applying continuous profiling.
  • In Data Pipelines, doing Automatic Java Coding for repetitive tasks.

When use System prompts?


Source: XP Core practices

Where is works?

System prompts works in main Java IDEs/CLI tools:


Cursor AI

Cursor CLI

Claude Code CLI

GitHub Copilot

GitHub Copilot CLI

JetBrains Junie

Where is works?

But in Java IDEs, the AI tooling support for complex system prompts is not the same in all products.


Latest review: https://github.com/jabrena/cursor-rules-java/blob/main/documentation/reviews/review-20250829.md

Where is works?

For Data Pipelines, you could use CLI tools, and...

Cursor Background Agents REST API

https://cursor.com/docs/background-agent/api/endpoints

Demos

  • Software Engineer features
    • Refactoring testing code
  • Data pipelines features
    • Hello World
    • Implemeting a new feature with TDD
    • Interacting with Models to retrieve Data from Models

Demo

References

Feedback

Your feedback is important to evolve this project. Participate in the following questionnaire:

https://forms.gle/TpNXENjmu45wuXoi6

🙏 🙏 🙏

Thanks