Skip to content
CAI
Software that uses CAICheck a score

bertilmuth/poem-hexagon

44.1

Weak · 21 September 2026

311

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Java-based application that generates and displays random poems, structured around a hexagonal architecture. It manages command dispatch and domain logic for selecting and rendering poems, with adapters for simulated user input and hardcoded poem data. The codebase has been refactored to use a requirements-as-code library for declarative command handling and modernized with updated build tools and test coverage.

Features

Add Code of Conduct and update build configuration

The project now includes a CODE\_OF\_CONDUCT.md file establishing community guidelines for behavior and enforcement. The build environment has been updated to use JDK 14 (replacing JDK 11/12/8) in .travis.yml, and the Gradle wrapper scripts (gradlew, gradlew.bat) have been refreshed with updated licensing headers, default JVM memory settings, and improved argument handling.

(repo-wide) · high confidence

Architecture

Restructure package layout and update port interfaces

The codebase has been reorganized to align with a hexagonal architecture pattern. The package structure was updated from 'poem.simple.drivenadapter' and 'poem.simple.driveradapter' to 'poem.simple.driven\_adapter' and 'poem.simple.driver\_adapter'. Additionally, the adapter classes were renamed to better reflect their roles: 'Driver' became 'SimulatedUser', and 'ConsoleWriter' was moved to the new package. The implementation of the 'IObtainPoems' interface was added in 'HardcodedPoemLibrary', and the 'ConsoleWriter' was updated to import from the new 'poem.boundary.driven\_port' package, while 'SimulatedUser' now imports from 'poem.boundary.driver\_port' and 'poem.command'.

_src/main/java/poem/simple/driven\_adapter, src/main/java/poem/simple/driver\adapter · high confidence

Behavioural changes

Refactor package structure and improve domain object equality

The application's package structure has been reorganized, moving classes from the 'poem.hexagon' namespace to 'poem.boundary' and 'poem.boundary.internal' to reflect a shift in architectural naming. Additionally, the 'Poem' domain class has been updated to use 'Arrays.equals' for its 'equals' and 'hashCode' implementations, ensuring correct comparison and hashing behavior for the 'verses' array.

src/main/java/poem/boundary/internal · high confidence

Refactored boundary layer to use requirements-as-code for command dispatch

The application's boundary layer has been refactored to integrate with the requirements-as-code library (v1.2.2 and v2.0), enabling declarative command-to-handler mapping. The new Boundary class implements BehaviorModel and uses StatelessBehavior to route commands like AskForPoem to their respective handlers (e.g., DisplayRandomPoem), replacing previous mutable state-based dispatching. Additionally, the package structure was simplified, moving interfaces like IReactToCommands from poem.hexagon.boundary.driverport to poem.boundary.driver\_port.

src/main/java/poem/boundary · medium confidence

Refactored package structure and adapter naming in the hexagonal architecture example

The example application's package structure has been simplified and standardized. Imports have been moved from the 'poem.hexagon' and 'poem.simple' root packages to 'poem' and 'poem.simple' respectively. Additionally, specific adapter classes have been renamed to better reflect their roles: 'PoetryLibrary' is now 'HardcodedPoemLibrary', and 'Driver' is now 'SimulatedUser', aligning with the hexagonal architecture pattern's distinction between driven and driver adapters.

src/main/java/poem/simple · medium confidence

Refactored package structure for command classes

The AskForPoem command class has been moved from the hexagonal architecture boundary package to a new, flatter package structure. This change simplifies the package hierarchy for command-related classes, removing the previous nested path and associated architectural comments.

src/main/java/poem/command · medium confidence

Removed PoetryLibrary driven adapter

The PoetryLibrary class, which previously provided poem data for German and English, has been removed from the drivenadapter package. This eliminates the hardcoded poem content and the associated language-based branching logic from this adapter.

src/main/java/poem/simple/drivenadapter · high confidence

Removed hexagonal boundary and use-case model classes

The Boundary class, which served as the primary communication point for driver adapters and managed command dispatch, has been removed. Additionally, the UseCaseModel class, which mapped commands to their respective handlers, has also been deleted. These changes indicate a simplification or restructuring of the application's hexagonal architecture by removing the boundary layer and its associated model definitions.

src/main/java/poem/hexagon · high confidence

Upgrade Gradle wrapper to v7.1.1

The Gradle wrapper has been updated to version 7.1.1, replacing the previous version 5.3. This change ensures that the project uses a more recent version of the Gradle build tool, which may include new features, performance improvements, and bug fixes.

gradle · high confidence

Test coverage

Added tests for the poem boundary and domain logic

Added new test files to verify the application's boundary and domain layers. BoundaryTest validates the interaction between the application's boundary and its dependencies, specifically checking that the correct poem is returned for English and German language requests. Additionally, RandomPoemPickerTest was moved to the boundary package to reflect the new package structure, ensuring the domain logic for selecting random poems is still covered by tests.

src/test · high confidence

Dependencies

Upgrade to requirements-as-code 2.0 and enable Maven Central publishing

The project now depends on 'org.requirementsascode:requirementsascodecore:2.0' (up from 1.1.1) and is configured to publish to Maven Central. The build script has been modernized to use the plugins block, sets Java 8 compatibility, and includes signing and publishing configurations for Javadoc and sources artifacts, enabling direct releases to the central repository.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 45 → 44 (-1.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 27 → 27 (+0.0)
  • Readiness 39 → 42 (+2.4)
  • Security 100 → 78 (-22.2)

Resolved (7)

  • Change coupling: ConsoleWriter.java ↔ SimulatedUser.java (src/main/java/poem/simple/driven_adapter/ConsoleWriter.java)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No architecture description: the hexagonal structure (ports, repositories, commands) is never explained. (README.md)
  • No exposed public API
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (10)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • No SBOM
  • No assertions: englishPoem (src/test/java/poem/boundary/BoundaryTest.java)
  • No assertions: englishPoemWhenUnknownLanguage (src/test/java/poem/boundary/BoundaryTest.java)
  • No assertions: germanPoem (src/test/java/poem/boundary/BoundaryTest.java)
  • No build provenance
  • No dependency advisory monitoring

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

bertilmuth/poem-hexagon was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2f401bbe2b030f973917bfdad2a9f3417e90f73f — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.