Skip to content

Remove duplicated Spring/Kotlin/Testing guidance from AGENTS.md files#2976

Merged
afranken merged 4 commits intomainfrom
copilot/extract-spring-guidance-doc
Feb 25, 2026
Merged

Remove duplicated Spring/Kotlin/Testing guidance from AGENTS.md files#2976
afranken merged 4 commits intomainfrom
copilot/extract-spring-guidance-doc

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

AGENTS.md files across the repo were re-stating guidance already covered in full by docs/SPRING.md, docs/KOTLIN.md, and docs/TESTING.md, creating maintenance overhead and inconsistency risk.

Changes

Root AGENTS.md — DO/DON'T section

Replaced 13 duplicated items (Kotlin idioms, Spring patterns, testing conventions) with a three-line blockquote pointing to the canonical docs. Kept only project-specific rules with no other home: AWS SDK v2/v1, JUnit 5/4, copyright year, sub-module dependency versions.

Root AGENTS.md — Error Handling section

Added a reference to docs/SPRING.md alongside the existing server/AGENTS.md pointer.

server/AGENTS.md

  • Implementation Flow step 3: replaced inline "don't create new exception classes" rule with a link to docs/SPRING.md
  • Error Handling section: removed the redundant S3Exception constants rule bullet; replaced with a reference to docs/SPRING.md (server-specific handler class names retained)

docs/TESTING.md — Conventions section

Removed Naming, Visibility, and Legacy-names bullets that verbatim restated docs/KOTLIN.md; the existing reference at the top of that section already covers them.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…NTS.md

Co-authored-by: afranken <763000+afranken@users.noreply.github.com>
Copilot AI changed the title [WIP] Extract Spring specific guidance into separate document Extract Spring-specific guidance into docs/SPRING.md Feb 25, 2026
…; replace with references to docs/

Co-authored-by: afranken <763000+afranken@users.noreply.github.com>
Copilot AI changed the title Extract Spring-specific guidance into docs/SPRING.md Remove duplicated Spring/Kotlin/Testing guidance from AGENTS.md files Feb 25, 2026
Copy link
Member

@afranken afranken left a comment

Choose a reason for hiding this comment

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

👍

@afranken afranken marked this pull request as ready for review February 25, 2026 21:25
Copilot AI review requested due to automatic review settings February 25, 2026 21:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request consolidates documentation by removing duplicated Spring, Kotlin, and testing guidance from various AGENTS.md files and creating a new canonical docs/SPRING.md reference. This reduces maintenance overhead and eliminates the risk of inconsistent documentation across the codebase.

Changes:

  • Created docs/SPRING.md as the canonical reference for Spring Boot patterns, dependency injection, exception handling, and testing conventions
  • Replaced 13 duplicated items in root AGENTS.md DO/DON'T section with references to docs/KOTLIN.md, docs/SPRING.md, and docs/TESTING.md
  • Updated error handling sections in root and server/AGENTS.md to reference docs/SPRING.md
  • Removed redundant bullets from docs/TESTING.md that were already covered by the existing reference to docs/KOTLIN.md

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
docs/SPRING.md New canonical documentation for Spring Boot patterns including bean registration, dependency injection, controllers, configuration properties, exception handling, and testing guidelines
AGENTS.md Replaced duplicated DO/DON'T guidance with references to canonical docs; updated error handling section to reference both docs/SPRING.md and server/AGENTS.md
server/AGENTS.md Updated implementation flow and error handling sections to reference docs/SPRING.md instead of inline rules
docs/TESTING.md Removed redundant naming, visibility, and legacy-names bullets that are already covered by the reference to docs/KOTLIN.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Controllers

- `@RestController` classes map HTTP only — never contain business logic
- All logic is delegated to a `@Service`; controllers call the service and return the result
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The use of backticks around "@service" is ambiguous and potentially confusing. Line 7 explicitly states not to use "@service" annotations, but this line suggests delegating to a "@service". Consider changing this to "service class" or "service bean" without backticks to avoid confusion with the Spring @Service annotation.

Suggested change
- All logic is delegated to a `@Service`; controllers call the service and return the result
- All logic is delegated to a service class; controllers call the service and return the result

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@afranken afranken left a comment

Choose a reason for hiding this comment

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

👍

@afranken afranken merged commit 1a44241 into main Feb 25, 2026
7 checks passed
@afranken afranken deleted the copilot/extract-spring-guidance-doc branch February 25, 2026 21:45
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.

3 participants