Context
This repo contains a REST API built with Java 25 and Spring Boot 4. Project guidance currently lives in two files: CLAUDE.md (a two-line stub with an @ include) and .github/copilot-instructions.md (the actual content). GitHub Copilot is no longer in use, making the split pointless. The goal is to establish CLAUDE.md as the single source of truth, verify its content against the code, and close gaps in .coderabbit.yaml.
Note: issue #299 (Implement Architecture Decision Records) has been implemented — docs/adr/ is live with all 12 ADRs. This issue should reference the existing directory directly rather than adding a forward reference.
Conflict resolution rule
The code is the source of truth. When copilot-instructions.md contradicts what the code actually does, fix the documentation — do not change the code.
Implementation steps
1. Verify copilot-instructions.md against the code
Before copying any content, read the actual code and confirm these claims are still accurate:
- No cache TTL: check
src/main/java/**/services/PlayersService.java — @Cacheable should have no time-based expiry; cache invalidation should use @CacheEvict(allEntries = true) on writes only
- Constructor injection only: spot-check service and repository classes — no
@Autowired field injection should be present
@Transactional(readOnly = true) on reads: check service read methods
- In-memory SQLite for tests: check
src/test/resources/application.properties — should configure an in-memory SQLite datasource
- BDD test naming (
givenX_whenY_thenZ): spot-check test class names and method names
- Port 9000: check
src/main/resources/application.properties
Document any discrepancies found. Correct copilot-instructions.md content before moving to step 2.
2. Consolidate into CLAUDE.md
Replace the entire content of CLAUDE.md with the (now-verified and corrected) content from .github/copilot-instructions.md. Then add:
## Invariants (never change without explicit discussion)
- Port: 9000
- API contract: endpoints, HTTP status codes, and response shapes are fixed;
do not change them without explicit discussion
- Commit format: `type(scope): description (#issue)` — max 80 chars
- Conventional Commits types: feat fix chore docs test refactor ci perf
- CHANGELOG.md `[Unreleased]` section must be updated before every commit
## Architecture Decision Records
Architectural decisions are documented in [`docs/adr/`](../docs/adr/README.md).
When proposing structural changes, check both this file and the relevant ADR.
When a decision changes, update this file and create or amend the relevant ADR.
Then update the Pre-commit Checks section to add:
6. If this commit introduces or changes an architectural decision, update
CLAUDE.md and create or amend the relevant ADR in `docs/adr/`.
Delete .github/copilot-instructions.md.
3. Update .coderabbit.yaml
Add to the src/**/services/**/*.java path instruction:
- Spring Cache is configured with NO expiry — this is intentional. Do not
suggest adding a TTL or time-based eviction. Cache is invalidated only on
write operations via @CacheEvict(allEntries = true).
Acceptance criteria
References
Context
This repo contains a REST API built with Java 25 and Spring Boot 4. Project guidance currently lives in two files:
CLAUDE.md(a two-line stub with an@include) and.github/copilot-instructions.md(the actual content). GitHub Copilot is no longer in use, making the split pointless. The goal is to establishCLAUDE.mdas the single source of truth, verify its content against the code, and close gaps in.coderabbit.yaml.Note: issue #299 (Implement Architecture Decision Records) has been implemented —
docs/adr/is live with all 12 ADRs. This issue should reference the existing directory directly rather than adding a forward reference.Conflict resolution rule
The code is the source of truth. When
copilot-instructions.mdcontradicts what the code actually does, fix the documentation — do not change the code.Implementation steps
1. Verify
copilot-instructions.mdagainst the codeBefore copying any content, read the actual code and confirm these claims are still accurate:
src/main/java/**/services/PlayersService.java—@Cacheableshould have no time-based expiry; cache invalidation should use@CacheEvict(allEntries = true)on writes only@Autowiredfield injection should be present@Transactional(readOnly = true)on reads: check service read methodssrc/test/resources/application.properties— should configure an in-memory SQLite datasourcegivenX_whenY_thenZ): spot-check test class names and method namessrc/main/resources/application.propertiesDocument any discrepancies found. Correct
copilot-instructions.mdcontent before moving to step 2.2. Consolidate into
CLAUDE.mdReplace the entire content of
CLAUDE.mdwith the (now-verified and corrected) content from.github/copilot-instructions.md. Then add:Then update the Pre-commit Checks section to add:
Delete
.github/copilot-instructions.md.3. Update
.coderabbit.yamlAdd to the
src/**/services/**/*.javapath instruction:Acceptance criteria
CLAUDE.mdhas been verified against the current codeCLAUDE.mdCLAUDE.mdcontains all content previously incopilot-instructions.mdCLAUDE.mdhas an Invariants section and a reference todocs/adr/CLAUDE.mdpre-commit checklist includes the ADR/CLAUDE.md update requirement.github/copilot-instructions.mdis deleted.coderabbit.yamlservice path instruction documents the intentional no-expiry cache behaviour[Unreleased]updatedReferences
docs/adr/is live with all 12 ADRs)