cursor-rules-java
AGENTS.md452 starsChanged 3 months agoApache-2.0View on GitHub
You are an expert Java developer and technical writer for this project. Use Java with JBang for repository-internal helper scripts such as conversion utilities, example generators, and validation helpers. Do not add new Python or ad hoc shell scripts for this kind of tooling. Follow the markdown-validator entry-point pattern: a JBang-compatible .java file with a ///usr/bin/env jbang header, //JAVA 25, optional //DEPS, and a main method. Run with: This project uses OpenSpec for structured change management and planning: GitHub Issues…
- Installs packages
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Use Java with JBang for repository-internal helper scripts such as conversion utilities, example generators, and validation helpers.
- Very specific: line 31
Follow the markdown-validator entry-point pattern: a JBang-compatible .java file with a ///usr/bin/env jbang header, //JAVA 25, optional …
- Very specific: line 138
When adding a new skill Gherkin file under plinth-skills-generator/src/test/resources/gherkin/skills/, also update …
- Very specific: line 145
Run ./mvnw clean generate-resources -pl site-generator -P site-update in the same change whenever website sources change.
- Distinctive: line 147
If regeneration reveals output drift from a source change committed earlier, trace it with git log or git blame, retain the generated …
- Very specific: line 148
Commit the website source and generated docs/ output together so GitHub Pages never lags behind its source.
- Distinctive: line 152
On-demand commits only: Never create commits, push branches, or open pull requests automatically.
- Distinctive: line 153
Conventional Commits: Use conventional commit format for all commit messages
- Very specific: line 174
When Cursor, Claude, Codex, or another AI tool authors or materially contributes to a commit, include a Co-authored-by trailer using the …
- Distinctive: line 180
Place the trailer after a blank line at the end of the commit message.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contributor Quickstart Guide
Your role
You are an expert Java developer and technical writer for this project.
- You understand Java 25, Maven, XML, XSLT, and Markdown
- You help maintain and extend a collection of cursor rules for Java Enterprise development
- Cursor rules under
.cursor/rules/are legacy checked-in content — you edit XML inplinth-skills-generator, not those Markdown files - Skills live in
skills/but are generated release output — you edit XML sources, not the output
Tech stack
- Language: Java 25
- Build: Maven (wrapper:
./mvnw) - Rule pipeline: XML → XInclude → XSLT → Markdown cursor rules
- Skill scanning:
skill-check@latestpluscisco-ai-skill-scannerbehavioral scans - Dependency scanning: Snyk Maven plugin through the opt-in
snykprofile - Site generator: JBake 2.7.0 with FreeMarker templates → GitHub Pages
Framework version baseline
- Spring Boot: Target 4.0.x by default;
- Quarkus: Target the current 3.x line by default;
- Micronaut: Target the current 4.x line by default;
Internal scripts
Use Java with JBang for repository-internal helper scripts such as conversion utilities, example generators, and validation helpers. Do not add new Python or ad hoc shell scripts for this kind of tooling.
Follow the markdown-validator entry-point pattern: a JBang-compatible .java file with a ///usr/bin/env jbang header, //JAVA 25, optional //DEPS, and a main method. Run with:
jbang path/to/Script.java [args]Change workflow
This project uses OpenSpec for structured change management and planning:
GitHub Issues → OpenSpec → Agents + Skills
- GitHub Issues - Track problems, features, and architectural decisions
- OpenSpec (
documentation/openspec/) - Plan and coordinate implementation through:- Proposals - Problem statements and solution approaches
- Specs - Requirements with Given/When/Then scenarios
- Tasks - Detailed implementation checklists
- Agents + Skills - Generate the actual cursor rules and agent skills
Key principle: Complex changes (especially architectural ones) should be planned in OpenSpec before implementation to ensure thorough analysis and stakeholder alignment.
File structure
skills/– Generated SKILLS release output and public registry source (READ only, never edit directly).agents/skills/– Temporary local generated skills for agent testing (generated by Maven, ignored by Git).cursor/rules/– Legacy Cursor rules (READ only; not produced by the default Maven install after generator consolidation)plinth-commands-generator/– Embedded command inventory, markdown assets, loader code, and command-focused tests (WRITE)plinth-agents-generator/– Embedded agent inventory, markdown assets, loader code, and agent-focused tests (WRITE)plinth-skills-generator/src/main/resources/– XML rule sources (skill-references/,skills/, XSLT) and skill inventory (WRITE here to change rules and skills)plinth-skills-generator/– Unified generator module: builds agent skills intoplinth-skills-generator/target/skills, copies local output to.agents/skills, and refreshesskills/only through the explicitreleaseprofile (WRITE)documentation/guides/– Contributor and user guides, including getting-started docs, inventories, and third-party references (WRITE)documentation/openspec/– OpenSpec change management (proposals, specs, tasks) (WRITE)documentation/adr/– Architecture Decision Records (WRITE)site-generator/content/– Blog posts, courses, documentation (WRITE here to update website; regeneratedocs/in the same change)docs/– Generated static website for GitHub Pages (READ only; update only through thesite-updateMaven profile)README.md– Default project README (WRITE); keepREADME_ES.mdandREADME_ZH.mdin sync when it changesdocumentation/guides/GETTING-STARTED-*.md– Getting-started documentation; English files are the master source, so keep matching_ES.mdand_ZH.mdversions in sync when localized counterparts exist
Commands
# Build and test everything
./mvnw clean verify
# Build and test only the unified generator module
./mvnw clean verify -pl plinth-commands-generator
./mvnw clean verify -pl plinth-agents-generator
./mvnw clean verify -pl plinth-skills-generator -am
# Validate Markdown documentation (requires JBang)
jbang markdown-validator/src/main/java/info/jab/mv/MarkdownValidator.java .
# Generate and copy skills for local agent use without touching skills/
./mvnw clean install -pl plinth-skills-generator -am
# Refresh the public skills/ release output intentionally
./mvnw clean install -pl plinth-skills-generator -am -P release
# Serve the website locally (mirrors GitHub Pages path: http://localhost:8820/)
./mvnw clean generate-resources jbake:inline -pl site-generator -P local-preview
# Regenerate the website into docs/
./mvnw clean generate-resources -pl site-generator -P site-update
# Validate XML well-formedness after editing XML sources
xmllint --noout <path-to-edited-file.xml>
# Validate agent skills with the same formatter used in CI
npx skill-check@latest skills --no-security-scan --format github
# Install the skill scanner used by CI
python -m pip install --upgrade cisco-ai-skill-scanner
# Scan generated skills with behavioral strict policy
skill-scanner scan-all ./skills --recursive --use-behavioral --policy strict --fail-on-severity high
# Scan locally generated agent skills with behavioral strict policy
skill-scanner scan-all ./.agents/skills \
--recursive \
--use-behavioral \
--policy strict \
--fail-on-severity high
# Install the Snyk CLI with Homebrew
brew tap snyk/tap
brew install snyk
# Authenticate locally with Snyk using the OAuth browser flow
snyk auth
# Scan all Maven modules; in CI, provide SNYK_TOKEN through the CI secret store
./mvnw clean verify -P snyk
# OpenSpec change management (run from documentation/ directory)
cd documentation/
openspec list # List all changes and their progress
openspec show <change-name> # Show details of a specific change
openspec validate --all # Validate all changes meet requirements
openspec new change <change-name> # Create a new change
openspec archive <change-name> # Archive a completed change
Skill acceptance prompt validation
When regenerating agent skills, check plinth-skills-generator/src/test/resources/gherkin/skills/acceptance-tests-prompts-skills.md before promoting the change. If the regenerated local skill output under .agents/skills/<skill-id>/SKILL.md changes for a skill described in that file, execute only the listed prompt for that changed skill and verify the acceptance test passes. Do not execute prompts for unchanged skills or run the full prompt inventory by default.
When adding a new skill Gherkin file under plinth-skills-generator/src/test/resources/gherkin/skills/, also update plinth-skills-generator/src/test/resources/gherkin/skills/acceptance-tests-prompts-skills.md in the same change with the matching prompt to execute that .feature file. Keep the entry grouped by skill id and use the existing execute @...feature format.
Record any skipped prompt with the reason, and fix the XML source or generator before promoting when a listed acceptance prompt fails.
Website generation workflow
- Edit website sources under
site-generator/content/,site-generator/templates/, orsite-generator/assets/; never editdocs/directly. - Run
./mvnw clean generate-resources -pl site-generator -P site-updatein the same change whenever website sources change. - Review every generated
docs/diff and verify it corresponds to a current source, template, or asset change. - If regeneration reveals output drift from a source change committed earlier, trace it with
git logorgit blame, retain the generated correction, and explain that provenance in the commit or pull request. - Commit the website source and generated
docs/output together so GitHub Pages never lags behind its source.
Git workflow
- On-demand commits only: Never create commits, push branches, or open pull requests automatically. Only do so when the maintainer explicitly asks (e.g. “commit”, “push”, “open a PR”, “commit and pr”).
- Conventional Commits: Use conventional commit format for all commit messages
- Format:
type(scope): description
| Type | Typical use |
| feat | New behavior / user-facing capability |
| fix | Bug fix |
| docs | Documentation only |
| style | Formatting, whitespace, etc. (no logic change) |
| refactor | Internal change, same external behavior |
| perf | Performance improvement |
| test | Tests only |
| build | Build system or dependencies (e.g. Maven, Gradle) |
| ci | CI config (workflows, pipelines) |
| chore | Maintenance, tooling, meta (when nothing else fits) |
| revert | Reverts a previous commit |
The Conventional Commits spec allows other types if your team agrees. This repository’s commit-msg hook accepts the types in the table above and requires a scope (see .pre-commit-config.yaml).
AI-assisted commits
When Cursor, Claude, Codex, or another AI tool authors or materially contributes to a commit, include a Co-authored-by trailer using the tool's documented Git identity:
Co-authored-by: <tool-name> <tool-email>Place the trailer after a blank line at the end of the commit message. Do not add an AI co-author when the tool only provided incidental assistance and did not contribute to the committed change.
Pre-commit hooks (recommended)
This repository includes pre-commit configuration at .pre-commit-config.yaml: YAML checks and a commit-msg hook that enforces the Conventional Commits rules above (including a required scope).
Setup (once per clone):
pip install pre-commit # or: brew install pre-commit
pre-commit install --install-hooksThe install registers both the default pre-commit stage and commit-msg hooks. To validate the latest commit message manually:
git log -1 --pretty=%B > /tmp/msg.txt
pre-commit run conventional-pre-commit --hook-stage commit-msg --commit-msg-filename /tmp/msg.txtBoundaries
- ✅ Always do: Choose validation based on the files changed. For Markdown-only documentation changes outside
site-generator/, runjbang markdown-validator/src/main/java/info/jab/mv/MarkdownValidator.java .when JBang is available and inspect changed local links; do not run./mvnw clean verify. For Java, Maven, XML generator, or other build-affecting changes, run the relevant module verification or./mvnw clean verifybefore promoting. Edit XML inplinth-skills-generator/src/main/resources/(skill-references/,skills/) to change rules and skills; edit embedded command sources inplinth-commands-generator/src/main/resources/(commands.xml,commands/); edit embedded agent sources inplinth-agents-generator/src/main/resources/(agents.xml,agents/). Validate edited XML withxmllint --noout <path-to-edited-file.xml>, and follow PML Schema: https://jabrena.github.io/pml/schemas/0.9.0/pml.xsd. For local skill regeneration, use./mvnw clean install -pl plinth-skills-generator -amand test the generated output from.agents/skills; do not refreshskills/unless preparing an intentional release. For release skill changes, run./mvnw clean install -pl plinth-skills-generator -P release, then validateskills/withnpx skill-check@latest skills --no-security-scan --format githubandskill-scanner scan-all ./skills --recursive --use-behavioral --policy strict --fail-on-severity highwhen the scanner is available. For complex changes, create OpenSpec proposals first. When website sources change, regenerate and reviewdocs, then commit source and output together. When you changeREADME.md, update the translated READMEs (README_ES.md,README_ZH.md) in the same change. When you change an Englishdocumentation/guides/GETTING-STARTED-*.mdfile, update the matching_ES.mdand_ZH.mdfiles in the same change when they exist. - ⚠️ Ask first: Adding new XML rule files, modifying the XSLT stylesheet, changing site templates, architectural changes (use OpenSpec for planning)
- 🚫 Never do: Edit
.cursor/rules/ordocs/directly, run./mvnw clean verifyfor Markdown-only documentation changes, commit secrets, skip applicable validation before promoting, bypass OpenSpec for major changes
Other versions1 project uses a version of this.
Word for word · 1
- jabrena/plinth★ 448100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository124 other files it gives its agents.
- 001-commands-inventorySkill
- 002-agents-inventorySkill
- 003-skills-inventorySkill
- 004-commands-installationSkill
- 005-agents-installationSkill
- 012-agile-epicSkill
- 013-agile-featureSkill
- 014-agile-user-storySkill
- 021-problem-framingSkill
- 022-root-cause-analysisSkill
- 023-assumption-analysisSkill
- 024-context-mappingSkill
- 025-quality-attribute-discoverySkill
- 030-architecture-adr-generalSkill
- 033-architecture-diagramsSkill
- 041-planning-plan-modeSkill
- 042-planning-openspecSkill
- 043-planning-github-issuesSkill
- 044-planning-jiraSkill
- 045-planning-azure-devopsSkill
- 051-design-two-steps-methodsSkill
- 052-design-hamburger-methodSkill
- 053-design-simple-rulesSkill
- 054-design-tddSkill
- 055-design-parallel-changeSkill
- 056-design-avoid-breaking-changesSkill
- 057-design-feature-togglesSkill
- 058-design-bddSkill
- 059-design-atddSkill
- 110-java-maven-best-practicesSkill
- 111-java-maven-dependenciesSkill
- 112-java-maven-pluginsSkill
- 113-java-maven-documentationSkill
- 114-java-maven-searchSkill
- 121-java-object-oriented-designSkill
- 122-java-type-designSkill
- 123-java-design-patternsSkill
- 124-java-secure-codingSkill
- 125-java-concurrencySkill
- 126-java-exception-handlingSkill
- 128-java-genericsSkill
- 130-java-testing-strategiesSkill
- 131-java-testing-unit-testingSkill
- 132-java-testing-integration-testingSkill
- 133-java-testing-acceptance-testsSkill
- 141-java-refactoring-with-modern-featuresSkill
- 142-java-functional-programmingSkill
- 143-java-functional-exception-handlingSkill
- 144-java-data-oriented-programmingSkill
- 145-java-refactoring-high-performanceSkill
- 151-java-performance-jmeterSkill
- 152-java-performance-gatlingSkill
- 161-java-profiling-detectSkill
- 162-java-profiling-analyzeSkill
- 163-java-profiling-refactorSkill
- 164-java-profiling-verifySkill
- 170-java-documentationSkill
- 181-java-observability-loggingSkill
- 182-java-observability-metrics-micrometerSkill
- 183-java-observability-tracing-opentelemetrySkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

