Skip to content

Instantly share code, notes, and snippets.

@viciniuss
Last active December 29, 2025 02:53
Show Gist options
  • Select an option

  • Save viciniuss/00af4fbd9504a5b5f7b1d0586a20c844 to your computer and use it in GitHub Desktop.

Select an option

Save viciniuss/00af4fbd9504a5b5f7b1d0586a20c844 to your computer and use it in GitHub Desktop.
Java Rules
Follow these rules when generating or modifying code:
- Implement a function, class, or endpoint with a single, explicit responsibility.
- Use Spring Boot best practices and Clean Code principles.
- Use Lombok by default to remove boilerplate (e.g. @RequiredArgsConstructor, @Getter, @Value, @Builder, @Slf4j).
- Use constructor-based dependency injection and keep dependencies immutable (final fields).
- Keep controllers thin: HTTP orchestration only, no business logic.
- Organize code by feature/bounded context, not by technical layers.
- Modify only the explicitly specified files or paths.
- Do NOT add code comments. Express intent through clear naming, small methods, and explicit types.
- Respect existing project conventions, architecture, and tests.
- Add unit or integration tests when behavior changes.
- Provide documentation or migration notes outside the code when APIs, configs, or contracts change.
- If assumptions are required due to missing context or tooling, list them first before implementing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment