{"owner":"Graylog2","repo":"graylog2-server","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\n## Frontend\n\nThe web interface lives in `graylog2-web-interface/` and has its own conventions. Before modifying frontend code, you must read `graylog2-web-interface/AGENTS.md` and follow its conventions.\n\n## Build Commands\n\n```bash\n# Quick verification — compiles Java, skips frontend and javadoc\n./mvnw compile -pl graylog2-server -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Full, clean compilation (includes frontend, runs all checks)\n./mvnw clean test-compile\n```\n\n**Note:** If working from the `graylog-project-internal` meta-project, run Maven commands from that root directory instead.\n\n## Running Tests\n\n```bash\n# Run a single test class\n./mvnw test -pl :graylog2-server -Dtest=MessageTest -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Run a single test method\n./mvnw test -pl :graylog2-server -Dtest=MessageTest#testMethod -Dskip.web.build=true -Dmaven.javadoc.skip=true\n```\n\n## Technology Stack\n\n### Dependency Injection\n- **Google Guice** — Use `@Inject` constructor injection; bindings defined in Guice modules\n\n### REST API\n- **Jersey (JAX-RS)** — Use `@Path`, `@GET`, `@POST`, `@Produces` annotations on resource classes\n\n### Serialization\n- **Jackson** — Automatic JSON serialization for REST payloads\n\n### Database\n- **MongoDB** with **MongoJack** — Document storage via `MongoCollection<T>` interface\n\n### Search Backend\n- **Elasticsearch/OpenSearch** — Pluggable storage adapters (`graylog-storage-elasticsearch7`, `graylog-storage-opensearch2`, `graylog-storage-opensearch3`)\n\n### Testing\n- **JUnit 5** + **Mockito** + **AssertJ** — Standard test stack\n- **TestContainers** — Integration tests with containerized dependencies\n\n### Key Libraries\n- **Guava** — Collections, caching, utilities\n- **Apache Shiro** — Authentication/authorization\n- **Caffeine** — In-memory caching\n- **OkHttp/Retrofit** — HTTP clients\n\n## Development Conventions\n\n### Java\n\n- Java 21 required\n\n#### Code Style\n\nThe project uses a customized IntelliJ IDEA Java code style.\n\n**How to apply code style (in order of precedence):**\n1. Follow the explicit rules documented below\n2. Match the style of surrounding code in the file you are editing\n3. If working from the `graylog-project-internal` meta-project, read `.idea/codeStyles/Project.xml` and apply the configured Java code style for anything not covered above\n\n**Key rules:**\n- Never use wildcard imports (`import foo.*`)\n- Prefer `final` for local variables\n- Always add `import` statements (regular or static) instead of using inline fully-qualified class names. Only use fully-qualified names to resolve naming conflicts.\n- Always verify import order before completing any Java edits\n\n**Import Order:**\n1. All non-static imports except `javax.*`/`java.*`, sorted alphabetically (includes `jakarta.*`)\n2. Blank line\n3. `javax.*` and `java.*` imports, sorted alphabetically (no blank line between them)\n4. Blank line\n5. Static imports, sorted alphabetically\n\n**Removing unused imports:**\n- Always remove unused imports from files you modify\n\n**String Formatting:**\n- For formatted strings (except logging), use the `f()` helper instead of string concatenation\n- Import: `import static org.graylog2.shared.utilities.StringUtils.f;`\n- Example: `f(\"Message size exceeds %d bytes\", maxSize)` instead of `\"Message size exceeds \" + maxSize + \" bytes\"`\n- For logging, continue using SLF4J's `{}` placeholders: `LOG.info(\"Size: {}\", size)`\n\n**License Headers:**\n- Java files in `src/main/java` and `src/test/java` must have the SSPL license header\n- Run `./mvnw license:format` to add missing headers\n\n#### Forbidden APIs\n\nThe build enforces API usage rules via the `forbiddenapis` Maven plugin. Certain Java APIs are prohibited — including deprecated methods, APIs that use platform-dependent defaults, and other error-prone patterns. **Before writing new code, read the forbidden API rules** in `pom.xml` (search for `forbiddenapis` in the plugin configuration) so you can avoid violations upfront rather than discovering them at compile time.\n\nCommon example: `\"text\".getBytes()` is forbidden — use `\"text\".getBytes(StandardCharsets.UTF_8)` instead.\n\n## Feature-Area Guidance\n\nBefore working on a specific feature area, check for an `AGENTS.md` in the relevant package or directory. These contain domain-specific context and conventions.\n\n## Before Completing Work\n\nBefore considering work complete, review your changes against the conventions in this file.\n\n## PR and Issue Output Guidelines\n\n- When outputting text for PRs, issues, or other GitHub content, always wrap code and file names in backticks and output raw markdown so it can be copied directly.\n- Keep PR descriptions brief — focus on motivation and approach, not exhaustive code changes since reviewers can read the diff.\n"},"files":{"AGENTS.md":"# AGENTS.md\n\n## Frontend\n\nThe web interface lives in `graylog2-web-interface/` and has its own conventions. Before modifying frontend code, you must read `graylog2-web-interface/AGENTS.md` and follow its conventions.\n\n## Build Commands\n\n```bash\n# Quick verification — compiles Java, skips frontend and javadoc\n./mvnw compile -pl graylog2-server -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Full, clean compilation (includes frontend, runs all checks)\n./mvnw clean test-compile\n```\n\n**Note:** If working from the `graylog-project-internal` meta-project, run Maven commands from that root directory instead.\n\n## Running Tests\n\n```bash\n# Run a single test class\n./mvnw test -pl :graylog2-server -Dtest=MessageTest -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Run a single test method\n./mvnw test -pl :graylog2-server -Dtest=MessageTest#testMethod -Dskip.web.build=true -Dmaven.javadoc.skip=true\n```\n\n## Technology Stack\n\n### Dependency Injection\n- **Google Guice** — Use `@Inject` constructor injection; bindings defined in Guice modules\n\n### REST API\n- **Jersey (JAX-RS)** — Use `@Path`, `@GET`, `@POST`, `@Produces` annotations on resource classes\n\n### Serialization\n- **Jackson** — Automatic JSON serialization for REST payloads\n\n### Database\n- **MongoDB** with **MongoJack** — Document storage via `MongoCollection<T>` interface\n\n### Search Backend\n- **Elasticsearch/OpenSearch** — Pluggable storage adapters (`graylog-storage-elasticsearch7`, `graylog-storage-opensearch2`, `graylog-storage-opensearch3`)\n\n### Testing\n- **JUnit 5** + **Mockito** + **AssertJ** — Standard test stack\n- **TestContainers** — Integration tests with containerized dependencies\n\n### Key Libraries\n- **Guava** — Collections, caching, utilities\n- **Apache Shiro** — Authentication/authorization\n- **Caffeine** — In-memory caching\n- **OkHttp/Retrofit** — HTTP clients\n\n## Development Conventions\n\n### Java\n\n- Java 21 required\n\n#### Code Style\n\nThe project uses a customized IntelliJ IDEA Java code style.\n\n**How to apply code style (in order of precedence):**\n1. Follow the explicit rules documented below\n2. Match the style of surrounding code in the file you are editing\n3. If working from the `graylog-project-internal` meta-project, read `.idea/codeStyles/Project.xml` and apply the configured Java code style for anything not covered above\n\n**Key rules:**\n- Never use wildcard imports (`import foo.*`)\n- Prefer `final` for local variables\n- Always add `import` statements (regular or static) instead of using inline fully-qualified class names. Only use fully-qualified names to resolve naming conflicts.\n- Always verify import order before completing any Java edits\n\n**Import Order:**\n1. All non-static imports except `javax.*`/`java.*`, sorted alphabetically (includes `jakarta.*`)\n2. Blank line\n3. `javax.*` and `java.*` imports, sorted alphabetically (no blank line between them)\n4. Blank line\n5. Static imports, sorted alphabetically\n\n**Removing unused imports:**\n- Always remove unused imports from files you modify\n\n**String Formatting:**\n- For formatted strings (except logging), use the `f()` helper instead of string concatenation\n- Import: `import static org.graylog2.shared.utilities.StringUtils.f;`\n- Example: `f(\"Message size exceeds %d bytes\", maxSize)` instead of `\"Message size exceeds \" + maxSize + \" bytes\"`\n- For logging, continue using SLF4J's `{}` placeholders: `LOG.info(\"Size: {}\", size)`\n\n**License Headers:**\n- Java files in `src/main/java` and `src/test/java` must have the SSPL license header\n- Run `./mvnw license:format` to add missing headers\n\n#### Forbidden APIs\n\nThe build enforces API usage rules via the `forbiddenapis` Maven plugin. Certain Java APIs are prohibited — including deprecated methods, APIs that use platform-dependent defaults, and other error-prone patterns. **Before writing new code, read the forbidden API rules** in `pom.xml` (search for `forbiddenapis` in the plugin configuration) so you can avoid violations upfront rather than discovering them at compile time.\n\nCommon example: `\"text\".getBytes()` is forbidden — use `\"text\".getBytes(StandardCharsets.UTF_8)` instead.\n\n## Feature-Area Guidance\n\nBefore working on a specific feature area, check for an `AGENTS.md` in the relevant package or directory. These contain domain-specific context and conventions.\n\n## Before Completing Work\n\nBefore considering work complete, review your changes against the conventions in this file.\n\n## PR and Issue Output Guidelines\n\n- When outputting text for PRs, issues, or other GitHub content, always wrap code and file names in backticks and output raw markdown so it can be copied directly.\n- Keep PR descriptions brief — focus on motivation and approach, not exhaustive code changes since reviewers can read the diff.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# AGENTS.md\n\n## Frontend\n\nThe web interface lives in `graylog2-web-interface/` and has its own conventions. Before modifying frontend code, you must read `graylog2-web-interface/AGENTS.md` and follow its conventions.\n\n## Build Commands\n\n```bash\n# Quick verification — compiles Java, skips frontend and javadoc\n./mvnw compile -pl graylog2-server -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Full, clean compilation (includes frontend, runs all checks)\n./mvnw clean test-compile\n```\n\n**Note:** If working from the `graylog-project-internal` meta-project, run Maven commands from that root directory instead.\n\n## Running Tests\n\n```bash\n# Run a single test class\n./mvnw test -pl :graylog2-server -Dtest=MessageTest -Dskip.web.build=true -Dmaven.javadoc.skip=true\n\n# Run a single test method\n./mvnw test -pl :graylog2-server -Dtest=MessageTest#testMethod -Dskip.web.build=true -Dmaven.javadoc.skip=true\n```\n\n## Technology Stack\n\n### Dependency Injection\n- **Google Guice** — Use `@Inject` constructor injection; bindings defined in Guice modules\n\n### REST API\n- **Jersey (JAX-RS)** — Use `@Path`, `@GET`, `@POST`, `@Produces` annotations on resource classes\n\n### Serialization\n- **Jackson** — Automatic JSON serialization for REST payloads\n\n### Database\n- **MongoDB** with **MongoJack** — Document storage via `MongoCollection<T>` interface\n\n### Search Backend\n- **Elasticsearch/OpenSearch** — Pluggable storage adapters (`graylog-storage-elasticsearch7`, `graylog-storage-opensearch2`, `graylog-storage-opensearch3`)\n\n### Testing\n- **JUnit 5** + **Mockito** + **AssertJ** — Standard test stack\n- **TestContainers** — Integration tests with containerized dependencies\n\n### Key Libraries\n- **Guava** — Collections, caching, utilities\n- **Apache Shiro** — Authentication/authorization\n- **Caffeine** — In-memory caching\n- **OkHttp/Retrofit** — HTTP clients\n\n## Development Conventions\n\n### Java\n\n- Java 21 required\n\n#### Code Style\n\nThe project uses a customized IntelliJ IDEA Java code style.\n\n**How to apply code style (in order of precedence):**\n1. Follow the explicit rules documented below\n2. Match the style of surrounding code in the file you are editing\n3. If working from the `graylog-project-internal` meta-project, read `.idea/codeStyles/Project.xml` and apply the configured Java code style for anything not covered above\n\n**Key rules:**\n- Never use wildcard imports (`import foo.*`)\n- Prefer `final` for local variables\n- Always add `import` statements (regular or static) instead of using inline fully-qualified class names. Only use fully-qualified names to resolve naming conflicts.\n- Always verify import order before completing any Java edits\n\n**Import Order:**\n1. All non-static imports except `javax.*`/`java.*`, sorted alphabetically (includes `jakarta.*`)\n2. Blank line\n3. `javax.*` and `java.*` imports, sorted alphabetically (no blank line between them)\n4. Blank line\n5. Static imports, sorted alphabetically\n\n**Removing unused imports:**\n- Always remove unused imports from files you modify\n\n**String Formatting:**\n- For formatted strings (except logging), use the `f()` helper instead of string concatenation\n- Import: `import static org.graylog2.shared.utilities.StringUtils.f;`\n- Example: `f(\"Message size exceeds %d bytes\", maxSize)` instead of `\"Message size exceeds \" + maxSize + \" bytes\"`\n- For logging, continue using SLF4J's `{}` placeholders: `LOG.info(\"Size: {}\", size)`\n\n**License Headers:**\n- Java files in `src/main/java` and `src/test/java` must have the SSPL license header\n- Run `./mvnw license:format` to add missing headers\n\n#### Forbidden APIs\n\nThe build enforces API usage rules via the `forbiddenapis` Maven plugin. Certain Java APIs are prohibited — including deprecated methods, APIs that use platform-dependent defaults, and other error-prone patterns. **Before writing new code, read the forbidden API rules** in `pom.xml` (search for `forbiddenapis` in the plugin configuration) so you can avoid violations upfront rather than discovering them at compile time.\n\nCommon example: `\"text\".getBytes()` is forbidden — use `\"text\".getBytes(StandardCharsets.UTF_8)` instead.\n\n## Feature-Area Guidance\n\nBefore working on a specific feature area, check for an `AGENTS.md` in the relevant package or directory. These contain domain-specific context and conventions.\n\n## Before Completing Work\n\nBefore considering work complete, review your changes against the conventions in this file.\n\n## PR and Issue Output Guidelines\n\n- When outputting text for PRs, issues, or other GitHub content, always wrap code and file names in backticks and output raw markdown so it can be copied directly.\n- Keep PR descriptions brief — focus on motivation and approach, not exhaustive code changes since reviewers can read the diff.\n","category":"root","tokens":1189}]}