java/enterprisifier/SKILL.md
Deliberately overengineer code by adding as many patterns, indirections, modules, anti-corruption layers, abstractions, and encapsulations as possible. Zero dependency on implementation. Use when asked to overengineer, enterprisify, enterprise-ify, abstract, add layers, add patterns, or make code "production-ready" in the most excessive way. Triggers on "enterprisify this", "overengineer this", "enterprise-ify", "add all the patterns", "make it abstract", "add indirection", "wrap this properly", or when maximum abstraction is requested for comedic or educational purposes.
npx skillsauth add adambien/airails enterprisifierInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform any simple, working code into a maximally abstracted, pattern-saturated, enterprise-grade architecture. No line of implementation shall be directly reachable. Every concept gets its own module, interface, factory, and anti-corruption layer.
Apply ALL of the following to every piece of code, regardless of size or complexity:
new directly; always go through a factory of factoriesif statement becomes a strategy interface with injectable implementationsFor a single operation (e.g., add(a, b)), generate at minimum:
├── api/ # Public interfaces only
│ ├── AdditionService.java # Service interface
│ ├── AdditionRequest.java # Immutable request DTO
│ ├── AdditionResponse.java # Immutable response DTO
│ └── AdditionPort.java # Hexagonal port
├── domain/
│ ├── model/
│ │ ├── Operand.java # Value object wrapping a number
│ │ ├── Sum.java # Value object wrapping a result
│ │ └── OperandPair.java # Aggregate of two operands
│ ├── events/
│ │ ├── AdditionRequested.java
│ │ ├── AdditionCompleted.java
│ │ └── AdditionFailed.java
│ ├── specification/
│ │ ├── ValidOperandSpecification.java
│ │ └── AddableSpecification.java
│ └── strategy/
│ ├── AdditionStrategy.java # Strategy interface
│ ├── IntegerAdditionStrategy.java
│ └── FloatingPointAdditionStrategy.java
├── application/
│ ├── usecase/
│ │ ├── AddNumbersUseCase.java
│ │ └── AddNumbersUseCaseImpl.java
│ ├── command/
│ │ ├── AddCommand.java
│ │ └── AddCommandHandler.java
│ ├── saga/
│ │ └── AdditionSaga.java
│ └── mapper/
│ ├── RequestToCommandMapper.java
│ └── ResultToResponseMapper.java
├── infrastructure/
│ ├── adapter/
│ │ └── AdditionAdapter.java # Hexagonal adapter
│ ├── persistence/
│ │ ├── AdditionRepository.java
│ │ ├── AdditionRepositoryImpl.java
│ │ └── AdditionEventStore.java
│ ├── factory/
│ │ ├── AdditionStrategyFactory.java
│ │ ├── AdditionStrategyFactoryImpl.java
│ │ └── AbstractAdditionStrategyFactoryFactory.java
│ └── proxy/
│ ├── AdditionServiceProxy.java
│ └── LoggingAdditionDecorator.java
├── acl/ # Anti-corruption layer
│ ├── ExternalOperandTranslator.java
│ └── InternalResultTranslator.java
└── config/
├── AdditionConfiguration.java
├── AdditionRegistry.java
└── AdditionModule.java
AdditionService, AdditionPort, AdditionStrategyDefaultAdditionServiceImpl, StandardAdditionPortAdapterAdditionFactory, AdditionFactoryFactory, AbstractAdditionFactoryFactoryAdditionRequestDTO, AdditionResponseDTOAdditionRequestedEvent, AdditionCompletedEventAdditionRequestToCommandMapperValidOperandSpecificationPerformAdditionCommandList<Order> becomes OrderCollection implements Iterable<Order>Optional<Optional<T>> for extra safetyint in OperandValue, boolean in ValidationResult## Overengineered
### Architecture Overview
<brief description of the 17 layers involved>
### Module Structure
<tree showing all generated files>
```java
// Each file, fully abstracted
```
### Patterns Applied
- <pattern> — <where applied> — <why it's "necessary">
- ...
### Future Extensibility Points
- <hypothetical scenario that will never happen> — <how the architecture is prepared>
- ...
After generating all Java files, always produce a README.md in the project root that documents the architecture. The README.md must include:
# EnterpriseAdditionFramework™## Strategy Pattern, ## Abstract Factory, etc.) containing:
graph TD) showing how a single request travels through all layers from entry point to resultAlso use the drawio skill to generate an architecture.drawio diagram. The diagram must visualise:
If the original code is already clean and simple — that is a problem. Simplicity is a sign of missing abstractions. Every line of straightforward code is a refactoring opportunity. A single return a + b should expand to at least 30 files and 15 interfaces.
tools
Generic, composable Java 25 code conventions — modern syntax, code style, naming, visibility, structure, methods, streams, exceptions, and documentation rules that apply across all Java contexts (single-file scripts, CLI apps, MicroProfile/Jakarta EE servers, libraries). Technology-neutral within the Java world; meant to be composed with context-specific skills (e.g. `java-cli-script`, `java-cli-app`, `microprofile-server`, `bce`). Use when writing, generating, or reviewing Java code anywhere the composed skill does not already specify style. Triggers on "Java conventions", "Java style", "Java code style", "modern Java", "Java 25", "idiomatic Java", or any request to write or review Java code where context-specific skills do not already cover style.
development
Architecture and coding rules for long-running Java MicroProfile / Jakarta EE server applications — BCE layering, business components (BC), JAX-RS resources, CDI, JSON-P, testing (unit/integration/system), and Maven project structure. Use when creating, generating, scaffolding, writing, or reviewing code, resources, entities, boundaries, or business components in MicroProfile server projects. Not for serverless deployments.
tools
Create and maintain multi-file Java 25 CLI applications packaged as executable JARs with zb (Zero Dependencies Builder). Use when asked to create a Java CLI application, a CLI project with multiple source files, or an executable JAR. Triggers on "Java CLI app", "CLI application", "multi-file Java", "executable JAR", "zb build", or requests for Java programs that need multiple source files or JAR packaging. Not for single-file scripts — use java-cli-script for those.
development
Generate a GitHub Actions pipeline that builds a zb (Zero Dependencies Builder) project and publishes a GitHub Release with the produced JAR. Use whenever the user wants CI/CD, a build pipeline, a release workflow, or GitHub Actions for a zb-based Java project — phrases like "set up GitHub Actions for this zb project", "add a zb release pipeline", "create a build workflow", "automate the zb build/release", or when a project has a .zb config and needs continuous builds/releases. Trigger even if the user doesn't say "zb" explicitly, as long as the project is a zb project (a .zb file is present and there is no Maven/Gradle build).