Skip to content

Commit fb4ab6e

Browse files
authored
Refactoring about Constraints & Output-requirements-section (#154)
* Refactoring about Constraints * Refactoring about Output format
1 parent 9aba496 commit fb4ab6e

21 files changed

Lines changed: 118 additions & 118 deletions

.cursor/rules/100-java-checklist-guide.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Your task is to create a comprehensive step-by-step guide that follows the exact
1515

1616
Create a markdown file named `CURSOR-RULES-JAVA.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
1717

18-
## Restrictions
18+
## Constraints
1919

2020
**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:
2121

@@ -26,7 +26,7 @@ Create a markdown file named `CURSOR-RULES-JAVA.md` with the following exact str
2626
- **ONLY** use the exact wording and structure from the template
2727
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
2828

29-
## Output Requirements
29+
## Output Format
3030

3131
- Generate the complete markdown file following the embedded template exactly
3232
- Use proper markdown formatting with headers, code blocks, tables, and checklists

.cursor/rules/110-java-maven-best-practices.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ Description: Define all dependency and plugin versions in the `<properties>` sec
584584
</project>
585585

586586
```
587-
## Output Requirements
587+
## Output Format
588588

589589
- Update the file pom.xml if something is not correct
590590
- verify changes with the command: `mvn validate`

.cursor/rules/112-java-maven-documentation.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When creating a README-DEV.md file for a Maven project, include ONLY the followi
1515

1616
Create a markdown file named `README-DEV.md` with the following exact structure: [java-maven-documentation-template.md](mdc:.cursor/rules/templates/java-maven-documentation-template.md)
1717

18-
## Restrictions
18+
## Constraints
1919

2020
**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:
2121

@@ -24,7 +24,7 @@ Create a markdown file named `README-DEV.md` with the following exact structure:
2424
- **ONLY** use the exact wording and structure from the template
2525
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
2626

27-
## Output Requirements
27+
## Output Format
2828

2929
- Generate the complete markdown file following the embedded template exactly
3030
- Use proper markdown formatting with headers, code blocks, tables, and checklists

.cursor/rules/121-java-object-oriented-design.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,8 +2466,8 @@ public class FileManager {
24662466
}
24672467
}
24682468
```
2469-
## Output Requirements
2469+
## Output Format
24702470

24712471
- Apply object-oriented design principles to improve code quality and maintainability
24722472
- Refactor code to follow SOLID principles and eliminate design smells
2473-
- Verify code changes compile and pass tests
2473+
- Verify code changes compile and pass tests

.cursor/rules/122-java-type-design.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ class BadProductService {
851851
}
852852
}
853853
```
854-
## Output Requirements
854+
## Output Format
855855

856856
- Apply type design principles to improve code quality and maintainability
857857
- Create type-safe wrappers for domain-specific types

.cursor/rules/123-java-general-guidelines.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ public class UnsafeFileProcessor {
328328
}
329329
}
330330
```
331-
## Output Requirements
331+
## Output Format
332332

333333
- Apply the Java general guidelines to improve code quality and maintainability
334334
- Follow naming conventions, formatting rules, and documentation standards
335-
- Implement comprehensive error handling with security considerations
335+
- Implement comprehensive error handling with security considerations

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ Type the following prompt in the cursor chat:
4747
Create an java development guide using the cursor rule @100-java-checklist-guide
4848
```
4949

50-
## Changelog
51-
52-
- Review the [CHANGELOG](./CHANGELOG.md) for further details
53-
5450
## Examples
5551

5652
The rules was tested with the following examples:
@@ -64,6 +60,10 @@ The rules was tested with the following examples:
6460
- [Serverless: AWS Lambda](./examples/aws-lambda-hello-world/README.md)
6561
- [Serverless: Azure Function](./examples/azure-function-hello-world/README.md)
6662

63+
## Changelog
64+
65+
- Review the [CHANGELOG](./CHANGELOG.md) for further details
66+
6767
## Java JEPS from Java 8
6868

6969
Java use JEPS as the vehicle to describe the new features to be added in the language. The repository review in a continuous way what JEPS could be improved any of the cursor rules present in this repository.

generator/src/main/resources/100-java-checklist-guide.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626
Create a markdown file named `CURSOR-RULES-JAVA.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
2727
</goal>
2828

29-
<restrictions>
30-
<restrictions-description>**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:</restrictions-description>
31-
<restriction-list>
32-
<restriction>**DO NOT** create additional steps beyond what's shown in the template</restriction>
33-
<restriction>**DO NOT** add cursor rules that are not explicitly listed in the embedded template</restriction>
34-
<restriction>**DO NOT** expand or elaborate on sections beyond what the template shows</restriction>
35-
<restriction>**ONLY** use cursor rules that appear in the embedded template</restriction>
36-
<restriction>**ONLY** use the exact wording and structure from the template</restriction>
37-
<restriction>If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</restriction>
38-
</restriction-list>
39-
</restrictions>
29+
<constraints>
30+
<constraints-description>**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:</constraints-description>
31+
<constraint-list>
32+
<constraint>**DO NOT** create additional steps beyond what's shown in the template</constraint>
33+
<constraint>**DO NOT** add cursor rules that are not explicitly listed in the embedded template</constraint>
34+
<constraint>**DO NOT** expand or elaborate on sections beyond what the template shows</constraint>
35+
<constraint>**ONLY** use cursor rules that appear in the embedded template</constraint>
36+
<constraint>**ONLY** use the exact wording and structure from the template</constraint>
37+
<constraint>If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</constraint>
38+
</constraint-list>
39+
</constraints>
4040

41-
<output-requirements-section>
42-
<output-requirements-list>
43-
<output-requirements-item>Generate the complete markdown file following the embedded template exactly</output-requirements-item>
44-
<output-requirements-item>Use proper markdown formatting with headers, code blocks, tables, and checklists</output-requirements-item>
45-
<output-requirements-item>**VERIFY**: Final output contains ONLY what appears in the embedded template</output-requirements-item>
46-
</output-requirements-list>
47-
</output-requirements-section>
41+
<output-format>
42+
<output-format-list>
43+
<output-format-item>Generate the complete markdown file following the embedded template exactly</output-format-item>
44+
<output-format-item>Use proper markdown formatting with headers, code blocks, tables, and checklists</output-format-item>
45+
<output-format-item>**VERIFY**: Final output contains ONLY what appears in the embedded template</output-format-item>
46+
</output-format-list>
47+
</output-format>
4848
</prompt>

generator/src/main/resources/110-java-maven-best-practices.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,10 @@ my-app/
623623
</example>
624624
</examples>
625625

626-
<output-requirements-section>
627-
<output-requirements-list>
628-
<output-requirements-item>Update the file pom.xml if something is not correct</output-requirements-item>
629-
<output-requirements-item>verify changes with the command: `mvn validate`</output-requirements-item>
630-
</output-requirements-list>
631-
</output-requirements-section>
626+
<output-format>
627+
<output-format-list>
628+
<output-format-item>Update the file pom.xml if something is not correct</output-format-item>
629+
<output-format-item>verify changes with the command: `mvn validate`</output-format-item>
630+
</output-format-list>
631+
</output-format>
632632
</prompt>

generator/src/main/resources/112-java-maven-documentation.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@
2626
Create a markdown file named `README-DEV.md` with the following exact structure: [java-maven-documentation-template.md](mdc:.cursor/rules/templates/java-maven-documentation-template.md)
2727
</goal>
2828

29-
<restrictions>
30-
<restrictions-description>**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:</restrictions-description>
31-
<restriction-list>
32-
<restriction>**DO NOT** create additional steps beyond what's shown in the template</restriction>
33-
<restriction>**DO NOT** expand or elaborate on sections beyond what the template shows</restriction>
34-
<restriction>**ONLY** use the exact wording and structure from the template</restriction>
35-
<restriction>If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</restriction>
36-
</restriction-list>
37-
</restrictions>
29+
<constraints>
30+
<constraints-description>**MANDATORY REQUIREMENT**: Follow the embedded template EXACTLY - do not add, remove, or modify any steps, sections, or cursor rules that are not explicitly shown in the template. ### What NOT to Include:</constraints-description>
31+
<constraint-list>
32+
<constraint>**DO NOT** create additional steps beyond what's shown in the template</constraint>
33+
<constraint>**DO NOT** expand or elaborate on sections beyond what the template shows</constraint>
34+
<constraint>**ONLY** use the exact wording and structure from the template</constraint>
35+
<constraint>If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</constraint>
36+
</constraint-list>
37+
</constraints>
3838

39-
<output-requirements-section>
40-
<output-requirements-list>
41-
<output-requirements-item>Generate the complete markdown file following the embedded template exactly</output-requirements-item>
42-
<output-requirements-item>Use proper markdown formatting with headers, code blocks, tables, and checklists</output-requirements-item>
43-
<output-requirements-item>**VERIFY**: Final output contains ONLY what appears in the embedded template</output-requirements-item>
44-
</output-requirements-list>
45-
</output-requirements-section>
39+
<output-format>
40+
<output-format-list>
41+
<output-format-item>Generate the complete markdown file following the embedded template exactly</output-format-item>
42+
<output-format-item>Use proper markdown formatting with headers, code blocks, tables, and checklists</output-format-item>
43+
<output-format-item>**VERIFY**: Final output contains ONLY what appears in the embedded template</output-format-item>
44+
</output-format-list>
45+
</output-format>
4646
</prompt>

0 commit comments

Comments
 (0)