Skip to content

Commit f229973

Browse files
authored
Improving structure (#448)
1 parent 562ff4c commit f229973

55 files changed

Lines changed: 94 additions & 27 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/170-java-documentation.md

Lines changed: 1 addition & 1 deletion

skills-generator/src/main/java/info/jab/pml/SkillsGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public SkillOutput generateSkill(String skillId) {
3838
}
3939

4040
private SkillMetadata parseMetadata(String skillId) {
41-
String xmlFileName = skillId + ".xml";
41+
String xmlFileName = "system-prompts/" + skillId + ".xml";
4242
try (InputStream xmlStream = getResource(xmlFileName)) {
4343
if (xmlStream == null) {
4444
throw new RuntimeException("XML resource not found: " + xmlFileName);
@@ -100,7 +100,7 @@ private String extractGoalFirstParagraph(Document doc) {
100100
}
101101

102102
private String generateReferenceContent(String skillId, SkillMetadata metadata) {
103-
return cursorRulesGenerator.generate(skillId + ".xml", "cursor-rules.xsl");
103+
return cursorRulesGenerator.generate("system-prompts/" + skillId + ".xml", "cursor-rules.xsl");
104104
}
105105

106106
private String loadSkillSummary(String skillId) {

system-prompts-generator/src/main/java/info/jab/pml/CursorRulesGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private Optional<String> executeTransformation(SAXSource xmlSource, InputStream
171171
TransformerFactory factory = TransformerFactory.newInstance();
172172
Transformer transformer = factory.newTransformer(new StreamSource(xslStream));
173173

174-
String ruleName = xmlFileName.replaceAll("\\.xml$", "");
174+
String ruleName = xmlFileName.replaceAll(".*/", "").replaceAll("\\.xml$", "");
175175
transformer.setParameter("ruleName", ruleName);
176176

177177
StringWriter stringWriter = new StringWriter();

system-prompts-generator/src/main/resources/100-java-system-prompt-java-list.xml renamed to system-prompts-generator/src/main/resources/system-prompts/100-java-system-prompt-java-list.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
`SYSTEM-PROMPTS-JAVA.md` with the following content:
1515

1616
```markdown
17-
<xi:include href="fragments/java-system-prompts-java-list-template.md" parse="text" />
17+
<xi:include href="assets/java-system-prompts-java-list-template.md" parse="text" />
1818
```
1919
</goal>
2020

system-prompts-generator/src/main/resources/110-java-maven-best-practices.xml renamed to system-prompts-generator/src/main/resources/system-prompts/110-java-maven-best-practices.xml

File renamed without changes.

system-prompts-generator/src/main/resources/111-java-maven-dependencies.xml renamed to system-prompts-generator/src/main/resources/system-prompts/111-java-maven-dependencies.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
I'll ask you a few targeted questions:
6262

6363
```markdown
64-
<xi:include href="fragments/java-maven-dependencies-questions-template.md" parse="text"/>
64+
<xi:include href="assets/questions/java-maven-dependencies-questions-template.md" parse="text"/>
6565
```
6666
</step-content>
6767
<step-constraints>

system-prompts-generator/src/main/resources/112-java-maven-plugins.xml renamed to system-prompts-generator/src/main/resources/system-prompts/112-java-maven-plugins.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
**IMPORTANT**: Ask these questions to understand the project needs before making any changes to the pom.xml. Based on the answers, you will conditionally add only relevant dependencies and plugins.
9191

9292
```markdown
93-
<xi:include href="fragments/java-maven-plugins-questions-template.md" parse="text"/>
93+
<xi:include href="assets/questions/java-maven-plugins-questions-template.md" parse="text"/>
9494
```
9595
</step-content>
9696
<step-constraints>
@@ -124,7 +124,7 @@
124124

125125
Use the following template to add properties to the pom.xml file:
126126

127-
<xi:include href="fragments/java-maven-properties-template.md" parse="text"/>
127+
<xi:include href="assets/java-maven-properties-template.md" parse="text"/>
128128

129129
**Implementation Strategy:**
130130
1. **Core Properties**: Always add Java version, Maven version, and encoding properties

system-prompts-generator/src/main/resources/113-java-maven-documentation.xml renamed to system-prompts-generator/src/main/resources/system-prompts/113-java-maven-documentation.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
Copy the following base template verbatim as the first section of `DEVELOPER.md`:
3535

3636
```markdown
37-
<xi:include href="fragments/java-maven-documentation-template.md" parse="text"/>
37+
<xi:include href="assets/java-maven-documentation-template.md" parse="text"/>
3838
```
3939
</step-content>
4040
<step-constraints>
@@ -68,7 +68,7 @@ Each row should show a `./mvnw artifactId:goal` command and a one-line descripti
6868
6969
Use the following catalog as a reference for known plugins:
7070
]]>
71-
<xi:include href="fragments/java-maven-documentation-plugin-catalog.md" parse="text"/>
71+
<xi:include href="assets/java-maven-documentation-plugin-catalog.md" parse="text"/>
7272
</step-content>
7373
<step-constraints>
7474
<step-constraint-list>

system-prompts-generator/src/main/resources/121-java-object-oriented-design.xml renamed to system-prompts-generator/src/main/resources/system-prompts/121-java-object-oriented-design.xml

File renamed without changes.

system-prompts-generator/src/main/resources/122-java-type-design.xml renamed to system-prompts-generator/src/main/resources/system-prompts/122-java-type-design.xml

File renamed without changes.

0 commit comments

Comments
 (0)