Skip to content

Commit 649a8e0

Browse files
authored
Improving the README (#160)
* Improving the README
1 parent 9bb2dcf commit 649a8e0

2 files changed

Lines changed: 20 additions & 70 deletions

File tree

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Stargazers over time
44
[![Stargazers over time](https://starchart.cc/jabrena/cursor-rules-java.svg?variant=light)](https://starchart.cc/jabrena/cursor-rules-java)
55

6+
[![CI Builds](https://github.com/jabrena/cursor-rules-java/actions/workflows/maven.yaml/badge.svg)](https://github.com/jabrena/cursor-rules-java/actions/workflows/maven.yaml)
7+
68
## Motivation
79

810
Modern Java IDEs, such as **Cursor AI**, provide ways to customize how the `Agent model` behaves using reusable and scoped instructions. In cursor, the way to do it is named `Cursor rule` and you could see it as a `System prompt` if you use a generic term. This repository provides a collection of Cursor rules designed for Java development.
@@ -11,17 +13,32 @@ Modern Java IDEs, such as **Cursor AI**, provide ways to customize how the `Agen
1113

1214
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.
1315

14-
[Further information](./docs/cursor-interaction-sequence.png)
15-
1616
## How to use the Cursor rules?
1717

1818
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`.
1919

2020
⚠️ 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**.
2121

22+
Review the following [sequence diagram](./docs/cursor-interaction-sequence.png) to understand the technical details.
23+
24+
## What is the structure of a System prompt?
25+
26+
Attending the documentation from [Google Gemini](https://drive.google.com/file/d/1AbaBYbEa_EbPelsT40-vj64L-2IwUJHy/view), [Anthropic Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview) & [OpenAI ChatGPT](https://chatgpt.com/share/686d1066-9e40-800b-ac7f-cc8df7e4c7d0), a prompt should be structured in the following way:
27+
28+
- Metadata
29+
- Role
30+
- Context (Optional)
31+
- Goal
32+
- Constraints (Optional)
33+
- Examples (Optional)
34+
- Output format (Optional)
35+
- Safeguards (Optional)
36+
37+
With this structure in mind, the project use a XML Schema to define the way that all System prompts are generated for Cursor AI. If you feel interested, you could review [the Schema](./generator/src/main/resources/pml.xsd). All non interactive Cursor rules are generated by XML to enforce consistency in the output and easy maintenance.
38+
2239
## Cursor Rules
2340

24-
Read the generated list of cursor rules for Java [here](./CURSOR-RULES-JAVA.md)
41+
Read the generated list of cursor rules for Java [here](./CURSOR-RULES-JAVA.md). The set of cursor rules cover aspects like, Build system based on Maven, Design, Coding, Testing, Refactoring, Performance with Jmeter & Profiling with Async Profiler.
2542

2643
## Getting started
2744

@@ -70,10 +87,6 @@ Java use JEPS as the vehicle to describe the new features to be added in the lan
7087

7188
- [JEPS List](./docs/All-JEPS.md)
7289

73-
## What is the structure of a Cursor rule?
74-
75-
Review the [template](./docs/000-cursor-rule-template.md) for details.
76-
7790
## Contribute
7891

7992
If you have new ideas to improve any of the current Cursor rules or add a new one, please fork the repo and send a PR.

docs/000-cursor-rule-template.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)