Skip to content

Add wirespec-detekt-rules module and reorganize hexagonal rulesets#1

Merged
nsmnds merged 1 commit intomainfrom
feature/wirespec-detekt-rules
Feb 4, 2026
Merged

Add wirespec-detekt-rules module and reorganize hexagonal rulesets#1
nsmnds merged 1 commit intomainfrom
feature/wirespec-detekt-rules

Conversation

@nsmnds
Copy link
Copy Markdown
Collaborator

@nsmnds nsmnds commented Feb 4, 2026

Summary

  • Add new wirespec-detekt-rules module to enforce contract-first design with Wirespec
  • Reorganize hexagonal rules into 5 layer-specific rulesets for better modularity
  • Add ApiCannotDependOnPorts rule

New Wirespec Rules

Rule Description
ControllerMustImplementWirespecHandler Ensures every @RestController implements a Wirespec Handler interface
NoManualSpringMappingAnnotations Prevents manual @GetMapping, @PostMapping etc. on non-override methods

Hexagonal Reorganization

Split into 5 rulesets that can be enabled/disabled per module:

  • hexagonal-domain - Domain layer rules
  • hexagonal-port - Port interface rules
  • hexagonal-adapter - Adapter implementation rules
  • hexagonal-dependency - Cross-layer dependency rules
  • hexagonal-layering - Naming and structural rules

Test plan

  • All wirespec-detekt-rules tests pass
  • All hexagonal-detekt-rules tests pass
  • Tested on afas-poc project - rules correctly detect violations

🤖 Generated with Claude Code

Wirespec module:
- Add ControllerMustImplementWirespecHandler rule
- Add NoManualSpringMappingAnnotations rule
- Enforce contract-first design with Wirespec specifications

Hexagonal improvements:
- Reorganize into 5 layer-specific rulesets (domain, port, adapter, dependency, layering)
- Add ApiCannotDependOnPorts rule
- Split config files per ruleset for better modularity
- Update README with new structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nsmnds nsmnds merged commit 1ce69b4 into main Feb 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant