- These instructions apply to the whole repository.
- If a subdirectory contains its own
AGENTS.md, the more specific file wins for that subtree.
- Java 13 Maven backend using Micronaut.
- Main application code:
src/main/java/org/breedinginsight - Tests:
src/test/java/org/breedinginsight - DB migrations:
src/main/resources/db/migration - API docs and related materials:
docs - Build config:
pom.xml - Docker and local setup:
README.md,docker-compose.yml
- Keep changes narrow and task-focused.
- Prefer fixing root causes over adding one-off workarounds.
- Do not edit
.env,.env.test,.env.template, or other secret-bearing config files unless explicitly asked. - Do not modify
target/,.idea/, or the large SQL dump files unless the task is specifically about them. - Scope searches to relevant directories instead of scanning the entire repository when possible.
- Do not edit historical Flyway migrations unless explicitly requested. Add a new migration instead.
target/.idea/
- Use Maven for validation.
- Source envs from
.envwhen runningmvncommands by usingset -a,source .env, andset +a. - Preferred targeted test command:
set -a source .env set +a mvn -Dtest=ClassName test --settings settings.xml
- Full test command:
set -a source .env set +a mvn test --settings settings.xml
- Full build without tests:
set -a source .env set +a mvn clean validate install -D maven.test.skip=true --settings settings.xml
- Tests may require Docker, Testcontainers, and local services. If validation cannot run, say exactly what blocked it.
- If endpoint behavior changes, do not update the relevant API docs or spec files in
docs, they are no longer being maintained. - If API code changes, add or update endpoint or integration tests.
- Schema changes belong in a new Flyway migration under
src/main/resources/db/migration. - If schema changes affect generated jOOQ code, run the documented generation flow.
- Prefer targeted tests for the changed area before suggesting a full test run.
- Prefer high-signal tests over broad or repetitive test coverage.
- Do not add unit tests by default for straightforward changes.
- Add unit tests selectively for hard-to-reproduce bugs, complex logic regressions, or behavior that is difficult or expensive to validate through integration tests.
- Prefer integration or endpoint tests for user-facing and API behavior changes.
- Avoid tests that mainly lock in implementation details or create disproportionate maintenance burden.
- When adding regression coverage, prefer the smallest number of tests that gives confidence in the fix.
- For controller or API changes, look first under
src/test/java/org/breedinginsight/apiandsrc/test/java/org/breedinginsight/brapi. - For importer work, check
src/test/java/org/breedinginsight/brapps/importer.
- Summarize changed files, validation performed, and any remaining risks.
- If tests or docs updates were skipped, explain why.