solid-java

SkillFiles & storage

Use when writing or refactoring Java code, structuring modules/[feature]/ layers, or defining interfaces/ contracts (SOLID, files < 100 lines).

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the solid-java skill

What this skill tells your AI

The instructions your AI receives, as published by fusengine/agents in plugins/solid/skills/solid-java/SKILL.md and read by ahel’s review.

Before writing any new code it requires a DRY check against modules/core/services and modules/core/interfaces. See solid-principles.md for the overview, the per-principle references for SRP/OCP/LSP/ISP/DIP detail, and the templates for module/service/interface/repository/error/test scaffolding.

SOLID Java - Modular Architecture

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Analyze existing architecture
  2. fuse-ai-pilot:research-expert - Verify Java docs via Context7
  3. fuse-ai-pilot:sniper - Post-implementation validation

DRY - Reuse Before Creating (MANDATORY)

Before writing ANY new code:

  1. Grep the codebase for similar interfaces, services, or logic
  2. Check shared locations: modules/core/services/, modules/core/interfaces/
  3. If similar code exists -> extend/reuse instead of duplicate
  4. If code will be used by 2+ features -> create it in modules/core/

Architecture (Modules MANDATORY)

LayerLocationMax Lines
Controllersmodules/[feature]/controllers/50
Servicesmodules/[feature]/services/100
Repositoriesmodules/[feature]/repositories/100
Interfacesmodules/[feature]/interfaces/30
Models/DTOsmodules/[feature]/models/50
Sharedmodules/core/{services,interfaces,models}/-

NEVER use flat src/ structure - always modules/[feature]/


Critical Rules (MANDATORY)

RuleValue
File limit100 lines (split at 90)
Controllers< 50 lines, delegate to services
Interfacesmodules/[feature]/interfaces/ ONLY
JavadocEvery public method documented
RecordsUse for DTOs (Java 16+)
SealedUse for restricted hierarchies (Java 17+)

Reference Guide

Concepts

TopicReferenceWhen to consult
SOLID Overviewsolid-principles.mdQuick reference
SRPsingle-responsibility.mdFat classes
OCPopen-closed.mdAdding providers
LSPliskov-substitution.mdContracts
ISPinterface-segregation.mdFat interfaces
DIPdependency-inversion.mdInjection
Architecturearchitecture-patterns.mdModular patterns

Templates

TemplateWhen to use
module.mdFeature module structure
service.mdBusiness logic service
interface.mdContract definition
repository.mdData access layer
error.mdCustom exceptions
test.mdUnit tests with mocks

Forbidden

Anti-PatternFix
Files > 100 linesSplit at 90
Interfaces in impl filesMove to interfaces/ directory
new ConcreteClass() in servicesUse dependency injection
Flat src/ structureUse modules/[feature]/
God classesSplit by responsibility

Signals

GitHub stars
25
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
solid-java
Source
github.com/fusengine/agents