From fdd85f7c342070623874e1bb72e5286c5537edae Mon Sep 17 00:00:00 2001 From: automation Date: Sat, 13 Sep 2025 22:42:58 +0100 Subject: [PATCH 1/3] fix: add explicit commons-lang3 dependency required by commons-configuration2 --- phoenixd-base/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phoenixd-base/pom.xml b/phoenixd-base/pom.xml index cefb7cb..ae08759 100644 --- a/phoenixd-base/pom.xml +++ b/phoenixd-base/pom.xml @@ -29,6 +29,11 @@ commons-configuration2 2.11.0 + + org.apache.commons + commons-lang3 + 3.14.0 + commons-beanutils commons-beanutils From 2f5883c13d860e6d48a8d555dbde11b7aef6d3fa Mon Sep 17 00:00:00 2001 From: automation Date: Sat, 13 Sep 2025 22:45:32 +0100 Subject: [PATCH 2/3] build: centralize dependency and plugin versions in parent properties --- phoenixd-base/pom.xml | 6 +++--- phoenixd-mock/pom.xml | 2 +- phoenixd-rest/pom.xml | 6 +++--- phoenixd-test/pom.xml | 2 +- pom.xml | 9 +++++++++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/phoenixd-base/pom.xml b/phoenixd-base/pom.xml index ae08759..d8fdced 100644 --- a/phoenixd-base/pom.xml +++ b/phoenixd-base/pom.xml @@ -27,17 +27,17 @@ org.apache.commons commons-configuration2 - 2.11.0 + ${commons.configuration2.version} org.apache.commons commons-lang3 - 3.14.0 + ${commons.lang3.version} commons-beanutils commons-beanutils - 1.9.4 + ${commons.beanutils.version} org.junit.jupiter diff --git a/phoenixd-mock/pom.xml b/phoenixd-mock/pom.xml index deddaad..ab37a03 100644 --- a/phoenixd-mock/pom.xml +++ b/phoenixd-mock/pom.xml @@ -58,7 +58,7 @@ com.google.cloud.tools jib-maven-plugin - 3.4.1 + ${jib-maven-plugin.version} gcr.io/distroless/java21 diff --git a/phoenixd-rest/pom.xml b/phoenixd-rest/pom.xml index 0a4c38f..33761b7 100644 --- a/phoenixd-rest/pom.xml +++ b/phoenixd-rest/pom.xml @@ -31,7 +31,7 @@ commons-beanutils commons-beanutils - 1.9.4 + ${commons.beanutils.version} org.projectlombok @@ -52,7 +52,7 @@ com.squareup.okhttp3 mockwebserver - 4.12.0 + ${mockwebserver.version} test @@ -62,7 +62,7 @@ com.google.cloud.tools jib-maven-plugin - 3.4.1 + ${jib-maven-plugin.version} gcr.io/distroless/java21 diff --git a/phoenixd-test/pom.xml b/phoenixd-test/pom.xml index 94051b2..0eb3e77 100644 --- a/phoenixd-test/pom.xml +++ b/phoenixd-test/pom.xml @@ -22,7 +22,7 @@ commons-beanutils commons-beanutils - 1.9.4 + ${commons.beanutils.version} ${project.groupId} diff --git a/pom.xml b/pom.xml index d7304d9..488793d 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,14 @@ 2.18.3 + + 2.11.0 + 1.9.4 + 3.14.0 + + + 4.12.0 + 5.9.1 3.23.1 @@ -35,6 +43,7 @@ 2.22.2 2.22.2 1.5.0 + 3.4.1 From b17d60df599eaf5d3661092ebca2e776f02c2042 Mon Sep 17 00:00:00 2001 From: automation Date: Sat, 13 Sep 2025 22:46:09 +0100 Subject: [PATCH 3/3] docs(agents): update coding and documentation guidelines - Added guidelines for maintaining versions in the parent pom.xml. - Included principles for writing clean code and documentation. - Emphasized compliance with the Cashu specification for new features. --- AGENTS.md | 58 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e9f3490..8187777 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,42 +3,58 @@ ## Description A simple Java client for ACINQ's [phoenixd REST API](https://phoenix.acinq.co/server/api). It wraps the HTTP endpoints and exposes typed requests and responses. +## Project +- Maintain the versions in the configuration section of the parent pom.xml file. + +## Coding +- When writing code, follow the "Clean Code" principles: + - [Clean Code](https://dev.398ja.xyz/books/Clean_Architecture.pdf) + - Relevant chapters: 2, 3, 4, 7, 10, 17 + - [Clean Architecture](https://dev.398ja.xyz/books/Clean_Code.pdf) + - Relevant chapters: All chapters in part III and IV, 7-14. + - [Design Patterns](https://github.com/iluwatar/java-design-patterns) + - Follow design patterns as described in the book, whenever possible. +- When commiting code, follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. +- When adding new features, ensure they are compliant with the Cashu specification (NUTs) provided above. + +## Documentation + +- When generating documentation: + - Follow the Diátaxis framework and classify each document as a tutorial, how-to guide, reference, or explanation. + - Place new Markdown files under `docs/
` matching the chosen category. + - Start each document with a top-level `#` heading and a short introduction that states the purpose. + - Link the document from `docs/README.md` in the corresponding section. + - Use relative links to reference other documents and keep code snippets minimal and tested. + - Consult the following resources on Diátaxis for guidance: + - https://github.blog/developer-skills/documentation-done-right-a-developers-guide/ + - https://diataxis.fr/ + - https://diataxis.fr/start-here/ + - https://diataxis.fr/how-to-use-diataxis/ + - https://diataxis.fr/tutorials/ + - https://diataxis.fr/how-to-guides/ + - https://diataxis.fr/tutorials-how-to/ + - https://diataxis.fr/quality/ + - https://diataxis.fr/complex-hierarchies/ + - https://diataxis.fr/compass/ ## Testing - Always run `mvn -q verify` from the repository root before committing your changes. - Include the command's output in the PR description. - If tests fail due to dependency or network issues, mention this in the PR. -- Update the `README.md` file if you add or modify features. +- Update the documentation files if you add or modify features. - Update the `pom.xml` file for new modules or dependencies, ensuring compatibility with Java 21. - Verify new Dockerfiles or `docker-compose.yml` files by running `docker-compose build`. - Document new REST endpoints in the API documentation and ensure they are tested. -- Add unit tests for new functionality, covering edge cases. +- Add unit tests for new functionality, covering edge cases. Follow "Clean Code" principles on unit tests, as described in the "Clean Code" book (Chapter 9). - Ensure modifications to existing code do not break functionality and pass all tests. - Add integration tests for new features to verify end-to-end functionality. - Ensure new dependencies or configurations do not introduce security vulnerabilities. -- Maintain the versions in the configuration section of the pom.xml files. - Add a comment on top of every test method to describe the test in plain English. ## Pull Requests +- Always follow the repository's PR submission guidelines and use the PR template located at `.github/pull_request_template.md`. - Summarize the changes made and describe how they were tested. - Include any limitations or known issues in the description. -- Add a "Network Access" section summarizing blocked domains if network requests were denied. -- Ensure all new features, modules, or dependencies are properly documented in the `README.md` file. -- Always follow the repository's PR submission guidelines and use the PR template located at `.github/pull_request_template.md`. -- When implementing features, consult the API specifications: - -## PR Quality Gate - -- Always follow the PR submission guidelines and use the [PR template](.github/pull_request_template.md) when creating pull requests. -- PR summaries must reference modified files with file path citations (e.g. `F:path/to/file.java†L1-L2`). -- PR titles and commit messages must follow the `type: description` naming format. -- Allowed types: feat, fix, docs, refactor, test, chore, ci, build, perf, style. -- The description should be a concise verb + object phrase (e.g., `refactor: Refactor auth middleware to async`). -- Include a Testing section listing the commands run. Prefix each command with ✅, ⚠️, or ❌ and cite relevant terminal output. -- If network requests fail, add a Network Access section noting blocked domains. -- When TODOs or placeholders remain, include a Notes section. -- Review AI-generated changes with developer expertise, ensuring you understand why the code works and that it remains resilient, scalable, and secure. -- Use `rg` for search instead of `ls -R` or `grep -R`. -- Ensure all new features are compliant with the API specification provided above. +- Ensure all new features are compliant with the Cashu specification (NUTs) provided above.