Agent skill
Spring
Every Spring service must satisfy these quality gates before merge.
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/spring
SKILL.md
Spring Boot Framework Rules
CRITICAL: Every Spring service must satisfy these quality gates before merge.
Build & Quality Commands
- Lint/format:
./gradlew checkstyleMainormvn verify - Unit tests:
./gradlew testormvn test - Integration tests:
./gradlew integrationTest(if module exists) - Static analysis:
./gradlew jacocoTestReportto ensure 80%+ coverage
Project Structure
- Keep domain logic in
src/main/java/.../service - Expose REST controllers in
controllerpackages - Isolate configuration classes under
config - Share DTOs via
dtopackage and map with MapStruct where applicable
Implementation Guidelines
- Manage configuration with
application.ymlprofiles (dev/test/prod) - Prefer constructor injection, avoid
@Autowiredfield injection - Wrap transactional operations with
@Transactional - Use
ResponseEntityfor explicit HTTP semantics - Validate inputs using
javax.validationannotations and@Valid
Build Matrix
# Gradle
./gradlew clean check
# Maven
mvn -B clean verify
Additional Checks
- Ensure
application.ymlcontains defaults for new properties - Update Flyway/Liquibase migrations when schema changes
- Keep
READMEand/docs/architecture.mdsynced with new services
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
DAG Workflow
Maintain a clean dependency graph (DAG) to prevent circular dependencies and ensure maintainable architecture.
Documentation Rules
All documentation in English. Root README concise, detailed docs in `/docs`.
Quality Enforcement
These rules are NON-NEGOTIABLE and MUST be followed without exception.
Rulebook Task Management
Spec-driven task management for features and breaking changes with OpenSpec-compatible format
Agent Automation
Mandatory workflow that AI agents MUST execute after EVERY implementation.
C
Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
Didn't find tool you were looking for?