

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Java Design Patterns - Priming Context for AI Agents23## Quick Overview4- This repository is a comprehensive collection of design patterns implemented in Java.5- The project demonstrates how to solve common software design problems using standard patterns.6- The code for each pattern lives directly in this repository, alongside its explanatory README.7- These readmes are published on the java-design-patterns.com website.8- Another repository (https://github.com/iluwatar/java-design-patterns-vuepress-web) handles the deployment of the website.910## Stack11- **Java 21**: The primary programming language used for pattern implementations.12- **Maven**: Dependency management and build tool.13- **JUnit 5**: The testing framework used to verify pattern behaviors.14- **Mockito**: Used for mocking dependencies in unit tests.15- **Lombok**: Used to reduce boilerplate code (getters, setters, etc.).16- **Spotless**: Enforces consistent code formatting via Google Java Format.1718## Trusted Sources19- [Java SE 21 Documentation](https://docs.oracle.com/en/java/javase/21/docs/api/)20- [Maven Official Documentation](https://maven.apache.org/guides/index.html)21- [JUnit 5 User Guide](https://junit.org/junit5/docs/current/user-guide/)22- [Project Wiki](https://github.com/iluwatar/java-design-patterns/wiki)2324## Structure25- `/pom.xml`: The root Maven configuration file that defines global dependencies and lists all pattern modules.26- `/[pattern-name]/`: Individual folders for each design pattern (e.g., `/abstract-factory`, `/builder`), acting as standalone Maven modules.27- `/[pattern-name]/src/main/java/`: Contains the actual Java implementation classes of the specific design pattern.28- `/[pattern-name]/src/test/java/`: Contains the JUnit tests verifying the pattern's behavior.29- `/[pattern-name]/README.md`: The documentation for the pattern, which gets published to the main website.3031## Patterns32- Keep pattern implementations simple, atomic, and easy to understand.33- Write descriptive and meaningful names for classes, interfaces, and methods.34- Always include comprehensive unit tests for every new pattern or code modification.35- Follow the Google Java Format strictly (enforced by Spotless).36- Document the intent, explanation, and real-world usage clearly in each module's `README.md`.3738## Anti-patterns39- Avoid overcomplicating patterns with unnecessary external dependencies or complex frameworks.40- Do not introduce business logic that distracts from the core mechanism of the design pattern itself.41- Submitting new patterns or features without corresponding unit tests is strictly discouraged.42- Avoid large monolithic packages; each pattern should reside in its own isolated module.4344## Example Design Pattern45When a new design pattern is added to the repository, it generally follows these steps:46- **Create a Module**: Create a new folder for the pattern in the root directory (e.g., `/my-new-pattern`).47- **Update root pom.xml**: Add `<module>my-new-pattern</module>` to the `<modules>` section of the root `pom.xml`.48- **Add Module pom.xml**: Create a `pom.xml` inside the new folder that inherits from the parent project.49- **Write the Code**: Implement the pattern logic under `src/main/java/com/iluwatar/mynewpattern`, usually including an `App.java` class to demonstrate its usage.50- **Write the Tests**: Add comprehensive unit tests under `src/test/java/com/iluwatar/mynewpattern`.51- **Document**: Create a `README.md` at the root of the new module, structured with standard sections like Intent, Explanation, Class diagram, Applicability, and Real world examples.52
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 200k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 14 days ago | |
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/inference/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+3 | 100/100 | 14 days ago | |
| rails/railsAGENTS.md · 59k | AGENTS.md | teststylearchgit+4 | 100/100 | 14 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 13 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/iluwatar-java-design-patterns-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.
Directory