Skip to content

Commit d12d817

Browse files
committed
new upgrade
1 parent 59e2bbc commit d12d817

10 files changed

Lines changed: 3117 additions & 123 deletions

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

spml/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,32 @@
183183
<allowSnapshots>false</allowSnapshots>
184184
</configuration>
185185
</plugin>
186+
187+
<!-- XML validation against DTD -->
188+
<plugin>
189+
<groupId>org.codehaus.mojo</groupId>
190+
<artifactId>xml-maven-plugin</artifactId>
191+
<version>1.1.0</version>
192+
<executions>
193+
<execution>
194+
<goals>
195+
<goal>validate</goal>
196+
</goals>
197+
<phase>validate</phase>
198+
<configuration>
199+
<validationSets>
200+
<validationSet>
201+
<dir>src/main/resources</dir>
202+
<includes>
203+
<include>*.xml</include>
204+
</includes>
205+
<validating>true</validating>
206+
</validationSet>
207+
</validationSets>
208+
</configuration>
209+
</execution>
210+
</executions>
211+
</plugin>
186212
</plugins>
187213
</build>
188214
</project>

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

Lines changed: 13 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<tag>checklist</tag>
1212
<tag>cursor-rules</tag>
1313
</tags>
14+
<version>0.8.0</version>
1415
</metadata>
1516

1617
<header>
@@ -26,93 +27,31 @@
2627
</description>
2728

2829
<content-sections>
29-
<instruction-section>
30-
<instruction-header>
31-
<instruction-title>Context</instruction-title>
32-
</instruction-header>
33-
<instruction-description>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.</instruction-description>
34-
<instruction-rules>
35-
</instruction-rules>
36-
</instruction-section>
37-
38-
<instruction-section>
39-
<instruction-header>
40-
<instruction-title>Template Structure (Self-Contained)</instruction-title>
41-
</instruction-header>
42-
<instruction-description>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)</instruction-description>
43-
<instruction-rules>
44-
</instruction-rules>
45-
</instruction-section>
46-
47-
<instruction-section>
48-
<instruction-header>
49-
<instruction-title>CRITICAL: Strict Template Adherence</instruction-title>
50-
</instruction-header>
51-
<instruction-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:</instruction-description>
52-
<instruction-rules>
53-
<instruction-rule type="mandatory">**DO NOT** create additional steps beyond what's shown in the template</instruction-rule>
54-
<instruction-rule type="mandatory">**DO NOT** modify the numbering system or step structure from the template</instruction-rule>
55-
<instruction-rule type="mandatory">**DO NOT** add cursor rules that are not explicitly listed in the embedded template</instruction-rule>
56-
<instruction-rule type="mandatory">**DO NOT** expand or elaborate on sections beyond what the template shows</instruction-rule>
57-
</instruction-rules>
58-
</instruction-section>
59-
60-
<instruction-section>
61-
<instruction-header>
62-
<instruction-title>Template Boundaries</instruction-title>
63-
</instruction-header>
64-
<instruction-description>### Template Boundaries:</instruction-description>
65-
<instruction-rules>
66-
<instruction-rule type="mandatory">**ONLY** use cursor rules that appear in the embedded template</instruction-rule>
67-
<instruction-rule type="mandatory">**ONLY** create the exact number of steps shown in the template (should be 6 steps, not more)</instruction-rule>
68-
<instruction-rule type="mandatory">**ONLY** use the exact wording and structure from the template</instruction-rule>
69-
<instruction-rule type="mandatory">**ONLY** include cursor rules explicitly present in the template reference table</instruction-rule>
70-
<instruction-rule type="conditional">If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</instruction-rule>
71-
</instruction-rules>
72-
</instruction-section>
73-
7430
<instruction-section>
7531
<instruction-header>
7632
<instruction-title>Instructions for AI</instruction-title>
7733
</instruction-header>
78-
<instruction-rules>
79-
<instruction-rule>**Follow the exact format** shown in the template above</instruction-rule>
80-
<instruction-rule>**Use the specific numbering system** (1.1, 1.2, etc.) as shown</instruction-rule>
81-
<instruction-rule>**Include all the bash commands exactly** as specified in the template</instruction-rule>
82-
<instruction-rule>**Maintain the checkbox structure** for progress tracking</instruction-rule>
83-
<instruction-rule>**Keep all notes and warnings** from the original PROMPTS.md format</instruction-rule>
84-
<instruction-rule>**Add the reference table and best practices** as shown in the template</instruction-rule>
85-
<instruction-rule>**Make it self-contained** - no external references needed</instruction-rule>
86-
</instruction-rules>
34+
<instruction-description>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)</instruction-description>
35+
<restrictions>
36+
<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>
37+
<restriction-list>
38+
<restriction>**DO NOT** create additional steps beyond what's shown in the template</restriction>
39+
<restriction>**DO NOT** add cursor rules that are not explicitly listed in the embedded template</restriction>
40+
<restriction>**DO NOT** expand or elaborate on sections beyond what the template shows</restriction>
41+
<restriction>**ONLY** use cursor rules that appear in the embedded template</restriction>
42+
<restriction>**ONLY** use the exact wording and structure from the template</restriction>
43+
<restriction>If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it</restriction>
44+
</restriction-list>
45+
</restrictions>
8746
</instruction-section>
8847

89-
<template-section type="configuration">
90-
<template-header>
91-
<template-title>Pre-Generation Validation Checklist</template-title>
92-
</template-header>
93-
<template-description>Before generating the guide, verify:</template-description>
94-
<template-content>
95-
<code-block>
96-
- [ ] All steps match the template exactly (no more, no less)
97-
- [ ] All cursor rules included are present in the template's reference table
98-
- [ ] No additional framework-specific rules added beyond template scope
99-
- [ ] Step numbering system matches template structure
100-
- [ ] Progress tracking section mirrors template format
101-
- [ ] Tips &amp; Best Practices section uses template content only
102-
</code-block>
103-
</template-content>
104-
</template-section>
105-
10648
<instruction-section>
10749
<instruction-header>
10850
<instruction-title>Output Requirements</instruction-title>
10951
</instruction-header>
11052
<instruction-rules>
11153
<instruction-rule>Generate the complete markdown file following the embedded template exactly</instruction-rule>
112-
<instruction-rule>Include all sections: Prerequisites, Process Overview, Reference Table, Tips, Progress Tracking</instruction-rule>
11354
<instruction-rule>Use proper markdown formatting with headers, code blocks, tables, and checklists</instruction-rule>
114-
<instruction-rule>Ensure the guide is beginner-friendly but comprehensive</instruction-rule>
115-
<instruction-rule>Make it portable to any repository without dependencies</instruction-rule>
11655
<instruction-rule>**VERIFY**: Final output contains ONLY what appears in the embedded template</instruction-rule>
11756
</instruction-rules>
11857
</instruction-section>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<tag>java</tag>
1212
<tag>best-practices</tag>
1313
</tags>
14+
<version>0.8.0</version>
1415
</metadata>
1516

1617
<header>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<tag>java</tag>
1212
<tag>documentation</tag>
1313
</tags>
14+
<version>0.8.0</version>
1415
</metadata>
1516

1617
<header>

spml/src/main/resources/system-prompt.dtd

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
version CDATA #IMPLIED>
66

77
<!-- Metadata section (equivalent to frontmatter) -->
8-
<!ELEMENT metadata (description, globs?, always-apply?, tags?)>
8+
<!ELEMENT metadata (description, globs?, always-apply?, tags?, version?)>
99
<!ELEMENT description (#PCDATA)>
1010
<!ELEMENT globs (#PCDATA)>
1111
<!ELEMENT always-apply (#PCDATA)>
1212
<!ELEMENT tags (tag*)>
1313
<!ELEMENT tag (#PCDATA)>
14+
<!ELEMENT version (#PCDATA)>
1415

1516
<!-- Header section -->
1617
<!ELEMENT header (title, subtitle?)>
@@ -108,7 +109,7 @@
108109
<!ELEMENT validation-criteria (#PCDATA)>
109110

110111
<!-- Instruction section for AI behavior -->
111-
<!ELEMENT instruction-section (instruction-header, instruction-description?, instruction-rules)>
112+
<!ELEMENT instruction-section (instruction-header, instruction-description?, instruction-rules?, restrictions?)>
112113
<!ELEMENT instruction-header (instruction-title, instruction-subtitle?)>
113114
<!ELEMENT instruction-title (#PCDATA)>
114115
<!ELEMENT instruction-subtitle (#PCDATA)>
@@ -119,6 +120,15 @@
119120
type (mandatory | optional | conditional) #IMPLIED
120121
priority (high | medium | low) #IMPLIED>
121122

123+
<!-- Restrictions block within instruction section -->
124+
<!ELEMENT restrictions (restrictions-description?, restriction-list)>
125+
<!ELEMENT restrictions-description (#PCDATA | emphasis | code-inline)*>
126+
<!ELEMENT restriction-list (restriction*)>
127+
<!ELEMENT restriction (#PCDATA | emphasis | code-inline)*>
128+
<!ATTLIST restriction
129+
type (mandatory | optional | conditional) #IMPLIED
130+
priority (high | medium | low) #IMPLIED>
131+
122132
<!-- Example section -->
123133
<!ELEMENT example-section (example-header, example-description?, example-content)>
124134
<!ATTLIST example-section type CDATA #IMPLIED>

spml/src/main/resources/unified-generator.xsl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,32 @@ Description: </xsl:text><xsl:value-of select="normalize-space(rule-description)"
211211
</xsl:otherwise>
212212
</xsl:choose>
213213
</xsl:if>
214+
<xsl:apply-templates select="restrictions"/>
214215
<xsl:for-each select="instruction-rules/instruction-rule">
215216
<xsl:text>- </xsl:text><xsl:value-of select="normalize-space(.)"/>
216217
<xsl:text>
217218
</xsl:text>
218219
</xsl:for-each>
219220
</xsl:template>
220221

222+
<!-- Restrictions template -->
223+
<xsl:template match="restrictions">
224+
<xsl:text>### Restrictions
225+
226+
</xsl:text>
227+
<xsl:if test="restrictions-description">
228+
<xsl:value-of select="normalize-space(restrictions-description)"/>
229+
<xsl:text>
230+
231+
</xsl:text>
232+
</xsl:if>
233+
<xsl:for-each select="restriction-list/restriction">
234+
<xsl:text>- </xsl:text><xsl:value-of select="normalize-space(.)"/>
235+
<xsl:text>
236+
</xsl:text>
237+
</xsl:for-each>
238+
</xsl:template>
239+
221240
<!-- Code block trimming utilities (reused from maven-best-practices-generator) -->
222241
<xsl:template name="trim-code-block">
223242
<xsl:param name="content"/>

spml/src/test/resources/100-java-checklist-guide.mdc

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,68 +13,24 @@ Role definition: You are a Senior software engineer with extensive experience in
1313

1414
Your task is to create a comprehensive step-by-step guide that follows the exact format and structure defined in the embedded template below.
1515

16-
## Context
17-
18-
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.
19-
20-
21-
22-
## Template Structure (Self-Contained)
16+
## Instructions for AI
2317

2418
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)
2519

26-
27-
28-
## CRITICAL: Strict Template Adherence
20+
### Restrictions
2921

3022
**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:
23+
3124
- **DO NOT** create additional steps beyond what's shown in the template
32-
- **DO NOT** modify the numbering system or step structure from the template
3325
- **DO NOT** add cursor rules that are not explicitly listed in the embedded template
3426
- **DO NOT** expand or elaborate on sections beyond what the template shows
35-
36-
37-
## Template Boundaries
38-
39-
### Template Boundaries:
40-
4127
- **ONLY** use cursor rules that appear in the embedded template
42-
- **ONLY** create the exact number of steps shown in the template (should be 6 steps, not more)
4328
- **ONLY** use the exact wording and structure from the template
44-
- **ONLY** include cursor rules explicitly present in the template reference table
4529
- If a cursor rule exists in the workspace but is not in the template, **DO NOT** include it
4630

4731

48-
## Instructions for AI
49-
50-
- **Follow the exact format** shown in the template above
51-
- **Use the specific numbering system** (1.1, 1.2, etc.) as shown
52-
- **Include all the bash commands exactly** as specified in the template
53-
- **Maintain the checkbox structure** for progress tracking
54-
- **Keep all notes and warnings** from the original PROMPTS.md format
55-
- **Add the reference table and best practices** as shown in the template
56-
- **Make it self-contained** - no external references needed
57-
58-
59-
## Pre-Generation Validation Checklist:
60-
61-
Before generating the guide, verify:
62-
63-
---
64-
65-
- [ ] All steps match the template exactly (no more, no less)
66-
- [ ] All cursor rules included are present in the template's reference table
67-
- [ ] No additional framework-specific rules added beyond template scope
68-
- [ ] Step numbering system matches template structure
69-
- [ ] Progress tracking section mirrors template format
70-
- [ ] Tips & Best Practices section uses template content only
71-
72-
7332
## Output Requirements
7433

7534
- Generate the complete markdown file following the embedded template exactly
76-
- Include all sections: Prerequisites, Process Overview, Reference Table, Tips, Progress Tracking
7735
- Use proper markdown formatting with headers, code blocks, tables, and checklists
78-
- Ensure the guide is beginner-friendly but comprehensive
79-
- Make it portable to any repository without dependencies
8036
- **VERIFY**: Final output contains ONLY what appears in the embedded template

0 commit comments

Comments
 (0)