Skip to content

Slim down CLAUDE.md to project-specific guardrails#1605

Open
lukaszlenart wants to merge 1 commit intorelease/struts-6-8-xfrom
slim-claudemd
Open

Slim down CLAUDE.md to project-specific guardrails#1605
lukaszlenart wants to merge 1 commit intorelease/struts-6-8-xfrom
slim-claudemd

Conversation

@lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented Mar 2, 2026

Summary

  • Remove generic architecture descriptions, common patterns, and technology lists that Claude already knows from training
  • Keep only build commands, project-specific traps (javax.servlet, OGNL sandbox, RAT headers), and module layout
  • Reduce from ~160 lines to ~35 lines

Based on CLAUDE.md benchmark results showing that generic instructions degrade performance on bug-fix and code-generation tasks, while project-specific guardrails raise worst-case scores.

Test plan

  • Verify Claude Code still picks up build commands and project rules from the slimmed file
  • Confirm no project-specific traps were lost (javax.servlet, OGNL security, RAT headers, plugin descriptors)

🤖 Generated with Claude Code

Based on benchmark findings that generic instructions degrade Claude's
performance on bug-fix and code-generation tasks. Remove architecture
descriptions, common patterns, and technology lists that Claude already
knows from training. Keep only build commands, project-specific traps,
and module layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
22 Security Hotspots
42.4% Coverage on New Code (required ≥ 80%)
3.4% Duplication on New Code (required ≤ 3%)
E Security Rating on New Code (required ≥ A)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

- **Security**: Always validate inputs and follow OWASP guidelines
- **Performance**: Leverage built-in caching (OGNL expressions, templates)
- **Deprecation**: Some legacy XWork components marked for removal
- This is the **6.8.x** branch (`release/struts-6-8-x`), version `6.8.1-SNAPSHOT`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest skipping the current version to simplify releases and avoid updating the file each time, since the version is already defined in the pom.xml.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on simplifying branch structure and to have just two:

  • main -> Struts 7
  • support/6.x -> Struts 6
    and then I will update CLAUDE.md

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