From 021bfce8a1d673262448442721dbb2afbf1c7a59 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:34:11 +0200 Subject: [PATCH 1/6] docs: state that -Ppre-commit auto-fixes (CLAUDE.md) -Ppre-commit rewrites tracked sources in place (license:format, rewrite:run). Documenting it as a pass/fail 'check' or 'gate' misleads: a run that repaired the tree and a run that changed nothing both exit 0. Co-Authored-By: Claude Opus 5 (1M context) --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5126e20..9c6cb0c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co # Run a single test method ./mvnw test -Dtest=ClassName#methodName -# Pre-commit checks +# Pre-commit auto-fix (license headers + formatting) - review and commit what it changed ./mvnw -Ppre-commit clean verify -DskipTests ``` From 9cc623cefc12cf10dbec9aafecd29ada798f3e04 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:34:12 +0200 Subject: [PATCH 2/6] docs: state that -Ppre-commit auto-fixes (doc/ai-rules.md) -Ppre-commit rewrites tracked sources in place (license:format, rewrite:run). Documenting it as a pass/fail 'check' or 'gate' misleads: a run that repaired the tree and a run that changed nothing both exit 0. Co-Authored-By: Claude Opus 5 (1M context) --- doc/ai-rules.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/ai-rules.md b/doc/ai-rules.md index 7627e8f..c6c23ca 100644 --- a/doc/ai-rules.md +++ b/doc/ai-rules.md @@ -69,7 +69,10 @@ Before any code implementation: ### Pre-Commit Checklist Execute in sequence before ANY commit: -1. **Quality Verification**: `./mvnw -Ppre-commit clean verify` +1. **Quality Auto-Fix**: `./mvnw -Ppre-commit clean verify` + - This REWRITES your files in place (license headers, formatting). Review what it + changed and commit it - a run that repaired the tree and a run that changed + nothing both exit 0, so check `git status` afterwards. - Fix ALL errors and warnings (mandatory) - Some recipes may add markers: Either fix them, or suppress them with proper justification. Never commit the markers. - Address code quality, formatting, and linting issues From 680bcd45e5e1e15f274be600e4081b3b8d6b7ec6 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:47:23 +0200 Subject: [PATCH 3/6] docs: name both mutating steps precisely (CLAUDE.md) Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) --- CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9c6cb0c..06bfe64 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co # Run a single test method ./mvnw test -Dtest=ClassName#methodName -# Pre-commit auto-fix (license headers + formatting) - review and commit what it changed +# Pre-commit auto-fix: license headers + every configured OpenRewrite recipe +# (modernization, not just formatting) - review every resulting diff and commit it ./mvnw -Ppre-commit clean verify -DskipTests ``` From 6b426dca6289b8ea76d7b948b53e9932afe244b7 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:47:24 +0200 Subject: [PATCH 4/6] docs: name both mutating steps precisely (doc/ai-rules.md) Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) --- doc/ai-rules.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/ai-rules.md b/doc/ai-rules.md index c6c23ca..f2313c5 100644 --- a/doc/ai-rules.md +++ b/doc/ai-rules.md @@ -70,9 +70,11 @@ Before any code implementation: Execute in sequence before ANY commit: 1. **Quality Auto-Fix**: `./mvnw -Ppre-commit clean verify` - - This REWRITES your files in place (license headers, formatting). Review what it - changed and commit it - a run that repaired the tree and a run that changed - nothing both exit 0, so check `git status` afterwards. + - This REWRITES your files in place: `license:format` updates license headers and + `rewrite:run` applies every configured OpenRewrite recipe -- which includes + modernization, not only formatting, so a recipe can make semantic source changes. + Review every resulting diff and commit it. A run that repaired the tree and a run + that changed nothing both exit 0, so check `git status` afterwards. - Fix ALL errors and warnings (mandatory) - Some recipes may add markers: Either fix them, or suppress them with proper justification. Never commit the markers. - Address code quality, formatting, and linting issues From e5454b98be52f4095493dc02e9caa3724f8befaf Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:47:26 +0200 Subject: [PATCH 5/6] docs: name both mutating steps precisely (doc/ai-rules.md) Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) --- doc/ai-rules.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ai-rules.md b/doc/ai-rules.md index f2313c5..22c27b0 100644 --- a/doc/ai-rules.md +++ b/doc/ai-rules.md @@ -52,7 +52,8 @@ These rules govern ALL development activities: ### Validation Requirements Before any code implementation: 1. **Standards Compliance Check**: Verify output matches CUI standards -2. **Build Verification**: Ensure generated code compiles and passes pre-commit checks +2. **Build Verification**: Ensure generated code compiles, then run the pre-commit profile and + commit the fixes it applies (it rewrites files; it is not a pass/fail check) 3. **Security Review**: Check for security anti-patterns and vulnerabilities 4. **Documentation Sync**: Verify documentation reflects any code changes 5. **Test Coverage**: Ensure adequate test coverage for new functionality From 3b17325e302d1c8024dec926d0100ae0171b2464 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <23139298+cuioss-oliver@users.noreply.github.com> Date: Wed, 9 Sep 2026 09:47:27 +0200 Subject: [PATCH 6/6] docs: name both mutating steps precisely (doc/ai-rules.md) Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) --- doc/ai-rules.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ai-rules.md b/doc/ai-rules.md index 22c27b0..8077a3c 100644 --- a/doc/ai-rules.md +++ b/doc/ai-rules.md @@ -322,6 +322,7 @@ Common Maven commands for CUI projects: ### Integration with Development Workflows - **CI/CD Awareness**: Understand and respect automated build and deployment processes -- **Quality Gate Integration**: Ensure all outputs pass automated quality checks +- **Quality Gate Integration**: Run the automated quality tooling and commit the fixes it + applies; the pre-commit profile rewrites files rather than only reporting - **Collaborative Development**: Optimize for effective human-AI pair programming - **Knowledge Contribution**: Help maintain and improve team knowledge base and documentation