Skip to content

v1: twelve GoF patterns in modern Java and five LLM patterns - #1

Merged
alejandrolunatech merged 4 commits into
mainfrom
claude/project-thread-lnkje9
Oct 21, 2026
Merged

alejandrolunatech merged 4 commits into
mainfrom
claude/project-thread-lnkje9

Conversation

@alejandrolunatech

Copy link
Copy Markdown
Owner

Requested by Alejandro · project thread

What this is

The whole v1 of the repo, as planned:

  • 12 GoF patterns rewritten with records, sealed types, lambdas and pattern matching: Strategy, Factory, Builder, Observer, Decorator, Adapter, Facade, Template Method (with a composition alternative), Chain of Responsibility, Command, State and Visitor (plus the classic Visitor for comparison).
  • 5 LLM patterns, all around one ModelClient port: provider adapters, routing by cost and quality, decorators (retry, cache, budget), a guardrail chain (PII masking, strict output contract, label and confidence checks), and a circuit breaker with a keyword-rules fallback. SupportTriageExampleTest wires them all together.
  • Every pattern has its code, a test class, and a one-page note next to the code: problem, code, what modern Java changes, when not to use it.

Quality

  • ./mvnw verify passes locally on Java 21: 78 tests, compiled with all warnings as errors.
  • ArchitectureTest (ArchUnit) keeps the patterns independent. I checked it actually fails: a temporary dependency from strategy to factory broke the build.
  • CI runs on Java 21 and Java 25, plus a gitleaks scan of the full history. Java 25 has not been run locally, because I can't install it here, so this PR's CI run is the first proof.
  • No runtime dependencies; no network or real model in any test (ADRs 0001 to 0003).

What you should review first

  1. README.md from top to bottom. It is what recruiters and tech leads see.
  2. The "How this was built" paragraph, which uses the honesty wording from the plan.
  3. Three patterns you'd most likely be asked about: gof/state, gof/visitor and llm/guardrails. Read the note, then the code, then the test.

docs/LEARNING-NOTES.md and the table in KATAS.md are left empty for you to fill in yourself. The katas are Strategy, Observer and Command.

After merging

Plan date to go public is Tue 27 Oct, after your review. Settings, General, Danger Zone, Change visibility, Public. Suggested About-box topics: java, design-patterns, java-21, llm, software-architecture, clean-code.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161vfA4EqmtxxFpChDsMeqw
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161vfA4EqmtxxFpChDsMeqw
…ls, circuit breaker

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161vfA4EqmtxxFpChDsMeqw
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161vfA4EqmtxxFpChDsMeqw
@alejandrolunatech alejandrolunatech self-assigned this Oct 21, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-21T08:06:34.240932Z 01d8a02 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@alejandrolunatech
alejandrolunatech merged commit 6b5a483 into main Oct 21, 2026
3 checks 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.

2 participants