Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/lsampaioweb/ai-instructions/spring-boot-architecturegit clone --depth 1 https://github.com/lsampaioweb/ai-instructionsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/lsampaioweb/ai-instructions/spring-boot-architecture)<a href="https://agentmods.dev/rules/lsampaioweb/ai-instructions/spring-boot-architecture"><img src="https://agentmods.dev/badge/rules/lsampaioweb/ai-instructions/spring-boot-architecture.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02184 |
| Opus 5 | $0.00000 | $0.01092 |
| Sonnet 5 | $0.00000 | $0.00437 |
| Haiku 4.5 | $0.00000 | $0.00218 |
Grade A, and why
spring-boot-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Architecture Governance Baseline
Dependencies
- Treat this section as the component rule registry for Spring Boot application work.
- Read each linked project rule when planning or reviewing application components:
.cursor/rules/spring-boot-actuator.mdc— Spring Boot actuator and observability contract: endpoint exposure, health probes, metrics, tracing, sampling, and sensitive-data boundaries (**/src/main/resources/application*.yml,**/*Service.java,**/*ServiceImpl.java,**/src/test/java/**/*.java).cursor/rules/spring-boot-api-versioning.mdc— API versioning rules: coexistence strategy, deprecation headers, and DTO evolution across versions (**/*Controller.java).cursor/rules/spring-boot-application.mdc— Spring Boot main application entry-point contract for bootstrap class placement, annotation discipline, and startup configuration safety (**/*Application.java).cursor/rules/spring-boot-async-events.mdc— Spring Boot async-events contract for deterministic event publication, consumer processing, and resilient delivery semantics (**/src/main/java/**/*Event*.java,**/src/main/java/**/*Publisher*.java,**/src/main/java/**/*Consumer*.java,**/src/main/java/**/*Listener*.java,**/src/main/java/**/*AsyncConfiguration*.java).cursor/rules/spring-boot-config.mdc— Spring Boot configuration contract for externalized, profile-aware, and safe configuration management (**/src/main/resources/application*.yml,**/*ConfigurationProperties.java,**/*Properties.java).cursor/rules/spring-boot-container.mdc— Compose and Dockerfile container rules: image structure, naming, profile activation, volume mounts, healthcheck, and log directory ownership (**/Dockerfile,**/docker-compose.yml,**/docker-compose.yaml,**/compose.yml).cursor/rules/spring-boot-controller.mdc— Spring Boot controller contract for request mapping, HTTP semantics, validation boundaries, and response consistency (**/*Controller.java).cursor/rules/spring-boot-database-schema.mdc— Database schema and referential-integrity contract: types, naming, constraints, FK actions, and SQL artifact layout (**/src/main/resources/sql/**/*.xml,**/src/main/resources/sql/**/*.sql).cursor/rules/spring-boot-dto-mapper.mdc— Spring Boot DTO-mapper contract for deterministic model mapping and boundary-safe transformations (**/*Request.java,**/*Response.java,**/*DtoMapper.java).cursor/rules/spring-boot-enum.mdc— Spring Boot enum contract for deterministic closed-set domain values in API, domain, and persistence boundaries (**/src/main/java/**/*Enum.java).cursor/rules/spring-boot-error-code.mdc— Spring Boot error-code contract for deterministic machine-readable API error semantics and stable message-key mapping (**/src/main/java/**/*ErrorCode.java).cursor/rules/spring-boot-exception.mdc— Spring Boot exception-handling contract for centralized response mapping, stable error payloads, and controlled failure semantics (**/*Exception*.java,**/*ExceptionHandler*.java,**/*Advice*.java).cursor/rules/spring-boot-gitignore.mdc— Spring Boot .gitignore contract for safe, complete exclusion of build output, IDE artifacts, OS files, secrets, and logs (**/.gitignore).cursor/rules/spring-boot-http-client.mdc— Spring Boot HTTP client contract for deterministic outbound calls, bounded resilience behavior, and secure integration boundaries (**/src/main/java/**/*HttpClient*.java,**/src/main/java/**/*HttpAdapter*.java,**/src/main/java/**/*HttpConfiguration*.java,**/src/main/java/**/*HttpProperties*.java).cursor/rules/spring-boot-i18n.mdc— Spring Boot i18n contract for message-key governance, locale behavior, and translation-safe output (**/messages*.properties,**/application*.yml,**/*Messages.java,**/*LogMessages.java,**/i18n/**/*.java).cursor/rules/spring-boot-java-style.mdc— Java coding style contract for import ordering, visibility discipline, string constants, blank-line rules, and helper extraction across all Java source files (**/src/**/*.java).cursor/rules/spring-boot-logging.mdc— Spring Boot logging contract for application log events, Logback appenders, rotation, and profile-level log routing (**/*Controller.java,**/*Service.java,**/*ServiceImpl.java,**/*Repository.java,**/*RepositoryImpl.java,**/*Filter.java,**/*Interceptor.java,**/*Advice.java,**/src/main/resources/**/logback-spring.xml).cursor/rules/spring-boot-model.mdc— Spring Boot domain model contract for JDBC-first internal model types, boundary isolation, and persistence-free field declarations (**/*Model.java).cursor/rules/spring-boot-openapi.mdc— Spring Boot OpenAPI contract for documented API metadata, discoverable endpoints, and stable specification output (**/OpenApiConfig.java,**/openapi/**/*.java,**/src/main/resources/application*.yml,**/*Controller.java).cursor/rules/spring-boot-pagination.mdc— Spring Boot pagination contract for pageable queries, deterministic ordering, and consistent paged response metadata (**/*Controller.java,**/*Pagination*.java,**/src/main/resources/application*.yml).cursor/rules/spring-boot-pom.mdc— Spring Boot Maven contract for dependency, plugin, and build-governance decisions (**/pom.xml).cursor/rules/spring-boot-readme.mdc— README structure rules for required sections, actionable content, fenced code blocks, and no-filler-prose policy (README.md,**/README.md).cursor/rules/spring-boot-repository.mdc— Spring Boot repository contract for JDBC-first data access, interface-implementation separation, and SQL safety (**/*Repository.java,**/*RepositoryImpl.java,**/*SqlConfigurationProperties.java,**/*SqlColumns.java).cursor/rules/spring-boot-security.mdc— Spring Boot security contract for authentication, authorization, service-level checks, and endpoint protection boundaries (**/*SecurityConfig.java,**/security/**/*.java).cursor/rules/spring-boot-service.mdc— Spring Boot service contract for business orchestration, transaction boundaries, and dependency-safe application logic (**/*Service.java,**/*ServiceImpl.java).cursor/rules/spring-boot-test.mdc— Spring Boot testing contract for layer-focused tests, API-contract assertions, and cross-cutting governance checks (**/src/test/java/**/*.java,**/*Test.java).cursor/rules/spring-boot-thymeleaf.mdc— Thymeleaf rules: controller conventions, template layout, model attributes, form binding, and static resource references (**/*PageController.java,**/*Routes.java,**/templates/**/*.html).cursor/rules/spring-boot-websocket.mdc— WebSocket/STOMP rules: endpoint topology, message flow contract, lifecycle handling, and client resilience (**/*Socket*.java,**/*Stomp*.java)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 76 lines · 0 tokens per session scan A cdd9ee76de33
spring-boot-architecture is a cursor rule published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 13d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,184 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
gradle
Enforce modern Gradle build practices for Java and Android projects, focusing on Kotlin DSL, modularity, version catalogs, and performance optimizations.
mockito
This guide provides definitive best practices for writing robust, maintainable, and readable unit tests using Mockito with JUnit 5, focusing on modern patterns and common pitfalls.
backend
Backend Java — Spring Boot controllers/services, JUnit controller tests, MakeMe. Read this first for any backend work.
java-import-fqn
Java 禁止不必要的全限定类名,必须 import(类名冲突除外).
springboot-jpa-best-practices
Java Spring Boot + JPA 项目最佳实践,涵盖分层架构、注解、事务、异常处理、安全与代码风格等。.
component-parameter-key-no-dot
@ComponentParameter 的 key 禁止包含 ".",统一使用下划线 / 顶层扁平命名.