You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
11
13
12
14
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.
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`.
19
19
20
20
⚠️ 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**.
21
21
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
+
22
39
## Cursor Rules
23
40
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.
25
42
26
43
## Getting started
27
44
@@ -70,10 +87,6 @@ Java use JEPS as the vehicle to describe the new features to be added in the lan
70
87
71
88
-[JEPS List](./docs/All-JEPS.md)
72
89
73
-
## What is the structure of a Cursor rule?
74
-
75
-
Review the [template](./docs/000-cursor-rule-template.md) for details.
76
-
77
90
## Contribute
78
91
79
92
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.
0 commit comments