Skip to content

Commit b47b8bc

Browse files
authored
From .xml (spml.xsd spec) to .mdc (WIP) (#108)
* Initial works with the generator * Remove example system prompt XML file (#112) * Create test and review xml requirements (#113) * Add Java code review checklist test implementation Co-authored-by: bren <bren@juanantonio.info> * Improving the solution * Moving to spml * Nice modelling for 100-java-checklist-guide * Tested improvement from spml generation * Minor change in changelog * Migrate from DTD to XSD validation with namespace support Co-authored-by: bren <bren@juanantonio.info> * Switch from XML Schema (XSD) to DTD validation * Checkpoint before follow-up message * Migrate from DTD to XSD validation with improved error handling * Develop XML for cursor rules and tests (#123) * Update Java design guidelines with improved content and examples * Refactor test cases to compare exact expected content for XSLT generation * Upgrade Java and create strict tests (#126) * Adding new rules to generate the associated xml * Add unified XSLT tests and XML resources for Java guidelines * Remove test file and configure surefire plugin (#129) * Update Maven version to 3.9.10 * Improved generation * Renaming schema and xslt * Adding the behaviour to migrate rules from spml to ./cursor/rules
1 parent ec6cbe7 commit b47b8bc

45 files changed

Lines changed: 18783 additions & 40 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,36 @@
11
---
2-
description: Create a Checklist with all Java steps to use with cursor rules for Java
3-
globs:
2+
description:
3+
globs:
44
alwaysApply: false
55
---
66
# Create a Checklist with all Java steps to use with cursor rules for Java
77

8-
You are an expert in Java programming language and technical documentation. Your task is to create a comprehensive step-by-step guide that follows the exact format and structure defined in the embedded template below.
8+
## System prompt characterization
99

10-
## Context
11-
You have access to a set of cursor rules that java development. You need to create a structured guide that helps new users navigate through the entire set of java cursor rules.
10+
Role definition: You are a Senior software engineer with extensive experience in Java programming language and technical documentation
11+
12+
## Description
13+
14+
Your task is to create a comprehensive step-by-step guide that follows the exact format and structure defined in the embedded template below.
15+
16+
## Instructions for AI
1217

13-
## Template Structure (Self-Contained)
1418
Create a markdown file named `JAVA-DEVELOPMENT-GUIDE.md` with the following exact structure: [java-checklist-template.md](mdc:.cursor/rules/templates/java-checklist-template.md)
1519

16-
## CRITICAL: Strict Template Adherence
17-
**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.
20+
### Restrictions
21+
22+
**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:
1823

19-
### What NOT to Include:
20-
- **DO NOT** add framework-specific rules (Spring Boot @301, REST API @304, Quarkus @401, etc.) unless they appear in the template
2124
- **DO NOT** create additional steps beyond what's shown in the template
22-
- **DO NOT** modify the numbering system or step structure from the template
2325
- **DO NOT** add cursor rules that are not explicitly listed in the embedded template
2426
- **DO NOT** expand or elaborate on sections beyond what the template shows
25-
26-
### Template Boundaries:
2727
- **ONLY** use cursor rules that appear in the embedded template
28-
- **ONLY** create the exact number of steps shown in the template (should be 6 steps, not more)
2928
- **ONLY** use the exact wording and structure from the template
30-
- **ONLY** include cursor rules explicitly present in the template reference table
3129
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
3230

33-
## Instructions for AI
34-
1. **Follow the exact format** shown in the template above
35-
2. **Use the specific numbering system** (1.1, 1.2, etc.) as shown
36-
3. **Include all the bash commands exactly** as specified in the template
37-
4. **Maintain the checkbox structure** for progress tracking
38-
5. **Keep all notes and warnings** from the original PROMPTS.md format
39-
6. **Add the reference table and best practices** as shown in the template
40-
7. **Make it self-contained** - no external references needed
41-
42-
## Pre-Generation Validation Checklist
43-
Before generating the guide, verify:
44-
- [ ] All steps match the template exactly (no more, no less)
45-
- [ ] All cursor rules included are present in the template's reference table
46-
- [ ] No additional framework-specific rules added beyond template scope
47-
- [ ] Step numbering system matches template structure
48-
- [ ] Progress tracking section mirrors template format
49-
- [ ] Tips & Best Practices section uses template content only
5031

5132
## Output Requirements
33+
5234
- Generate the complete markdown file following the embedded template exactly
53-
- Include all sections: Prerequisites, Process Overview, Reference Table, Tips, Progress Tracking
5435
- Use proper markdown formatting with headers, code blocks, tables, and checklists
55-
- Ensure the guide is beginner-friendly but comprehensive
56-
- Make it portable to any repository without dependencies
5736
- **VERIFY**: Final output contains ONLY what appears in the embedded template

.editorconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# File generated by jbang setup@jabrena
4+
5+
# top-most EditorConfig file
6+
root = true
7+
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.html]
15+
indent_style = space
16+
indent_size = 4
17+
18+
[*.json]
19+
indent_style = space
20+
indent_size = 4
21+
22+
[*.xml]
23+
indent_style = space
24+
indent_size = 4
25+
26+
[*.java]
27+
indent_style = space
28+
indent_size = 4
29+
30+
[*.yml,*.yaml]
31+
indent_style = space
32+
indent_size = 2
33+
34+
[*.dsl]
35+
indent_style = space
36+
indent_size = 4

.gitattributes

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

.github/workflows/maven.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
with:
1515
distribution: 'graalvm' # See 'Supported distributions' for available options
1616
java-version: '24'
17+
- name: Generate Cursor Rules
18+
run: cd spml && ./mvnw --batch-mode --no-transfer-progress verify --file pom.xml
1719
- name: Maven build
1820
run: cd examples/maven-demo && ./mvnw --batch-mode --no-transfer-progress verify --file pom.xml
1921
- name: Spring Boot build

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.DS_Store
2-
tmp
32
target/
3+
.idea/
4+
.vscode/
45
*.log
6+
.classpath

.sdkmanrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
java=24.0.1-graalce
2+
maven=3.9.10

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.7.0] - 2025-06-30
8+
## [0.7.0] 2025-06-30
99

1010
### Added
1111

1212
- **Java Profiling Support**: Added comprehensive profiling cursor rules (#81, #88, #91)
1313
- `@161-java-profiling-detect` for detecting performance issues
14-
- `@162-java-profiling-analyze` for analyzing profiling results
14+
- `@162-java-profiling-analyze` for analyzing profiling results
1515
- `@164-java-profiling-compare` for comparing profiling data
1616
- **Java Checklist Guide**: Added `@100-java-checklist-guide` cursor rule to help developers use cursor rules effectively (#59)
1717
- **Maven Documentation**: Added `@112-java-maven-documentation` cursor rule to generate README-DEV.md from existing pom.xml files

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ If you have new ideas to improve any of the current Cursor rules or add a new on
139139
## Cursor rules ecosystem
140140

141141
- https://github.com/jabrena/101-cursor
142+
- https://github.com/jabrena/spml
142143
- https://github.com/jabrena/cursor-rules-methodology
143144
- https://github.com/jabrena/cursor-rules-agile
144145
- https://github.com/jabrena/cursor-rules-java
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Essential Maven Goals:
2+
3+
```bash
4+
# Analyze dependencies
5+
./mvnw dependency:tree
6+
./mvnw dependency:analyze
7+
./mvnw dependency:resolve
8+
9+
./mvnw clean validate -U
10+
./mvnw buildplan:list-plugin
11+
./mvnw buildplan:list-phase
12+
./mvnw help:all-profiles
13+
./mvnw help:active-profiles
14+
./mvnw license:third-party-report
15+
16+
# Clean the project
17+
./mvnw clean
18+
19+
# Clean and package in one command
20+
./mvnw clean package
21+
22+
# Run integration tests
23+
./mvnw verify
24+
25+
# Check for dependency updates
26+
./mvnw versions:display-property-updates
27+
./mvnw versions:display-dependency-updates
28+
./mvnw versions:display-plugin-updates
29+
30+
# Generate project reports
31+
./mvnw site
32+
jwebserver -p 8005 -d "$(pwd)/target/site/"
33+
```

spml/.mvn/jvm.config

Whitespace-only changes.

0 commit comments

Comments
 (0)