AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
54/100
Scores the file, not the repository.Length
444 words
4 headings · 0 code blocksRepository
45k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# gRPC C++ Agents Collaboration Guide23This document outlines conventions and best practices for AI-assisted development in the gRPC C++ codebase.45## Preferred Tools & Libraries6* Prefer gRPC types before absl.7* Prefer std types when available, use absl types when not8* Prefer `std::optional` over `absl::optional`9* gRPC uses C++17, so we can't use C++20 onwards types.10* The Python implementation cannot depend on the protobuf library, so any shared libraries must expose a C-style API that does not rely on C++ protobuf types.1112## Code Style & Conventions13* `#include <grpc/support/port_platform.h>` is not required unless its macros are needed for compilation.14* Only include headers that are actively used.15* Abseil headers are sorted before gRPC headers.16* For public api headers (in `include/grpc`) we use `<grpc/...>`.17 * Example: `#include <grpc/grpc.h>`18* Prefer explicit types over `std::pair` or `std::tuple` for return types.19* Use `LOG(ERROR)` from `absl/log/log.h` for logging errors, never use `std::cerr` or `gpr_log`.20* The `fuzztest.h` header is located at `fuzztest/fuzztest.h`.2122## About gRPC23* gRPC uses its own macros for Bazel libraries, tests, etc. Each directory should have a `grpc_package` declaration. For libraries use `grpc_cc_library`, for tests `grpc_cc_test`.24* Dependencies on non-gRPC libraries (like gtest or absl) are listed in the `external_deps` attribute.25* The `:grpc` BUILD target is not allowed to depend on the C++ protobuf library, either directly or transitively.26* Build files for implementation code are typically located in `src/core/BUILD` and `BUILD`. Do not add new `BUILD` files under the `src/` tree without explicit instruction.27* Tests are located in `test/core` and `test/cpp` (corresponding to the `src` directories). These test directories contain their own `BUILD` files.28* Fuzz tests use `fuzztest_main` instead of `gtest_main`.29* When depending on a `grpc_proto_library`, the name of the `cc_library` target is the same as the `name` of the `grpc_proto_library` rule itself, not `[name]_cc_proto` as one might expect from standard Bazel `cc_proto_library` rules. The build system error messages can be misleading in this case.30* The 'gtest' external_dep also includes 'gmock'.31* All `upb` related build rules (`grpc_upb_proto_library`, `grpc_upb_proto_reflection_library`) for protos defined anywhere in the repository must be defined in the root `BUILD` file. They should not be placed in the `BUILD` file of the subdirectory where the proto is located.32* Core end-to-end tests are defined in `test/core/end2end/BUILD` using the `grpc_core_end2end_test_suite` macro. This macro generates multiple `grpc_cc_test` targets by combining a configuration file (like `end2end_http2_config.cc`) with individual test implementation files located in `test/core/end2end/tests/`. The final test target name is created by appending `_test` to the `name` attribute of the macro. For example, `grpc_core_end2end_test_suite(name = "end2end_http2", ...)` generates the test target `//test/core/end2end:end2end_http2_test`.33* Unused named parameters is a compilation failure.34
Also in grpc/grpc
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| grpc/grpcsrc/core/ext/filters/census/AGENTS.md · 45k | AGENTS.md | no sections | 25/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/gcp_authentication/AGENTS.md · 45k | AGENTS.md | security | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/http/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/stateful_session/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chaotic_good/AGENTS.md · 45k | AGENTS.md | no sections | 48/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/inproc/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/filter/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/handshaker/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/server/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/service_config/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/telemetry/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/transport/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/transport/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/filters/backend_metrics/AGENTS.md · 45k | AGENTS.md | no sections | 44/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/tsi/alts/AGENTS.md · 45k | AGENTS.md | no sections | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/credentials/call/AGENTS.md · 45k | AGENTS.md | security | 39/100 | 3 days ago | |
| grpc/grpcsrc/core/ext/transport/chttp2/AGENTS.md · 45k | AGENTS.md | testarchdependencies | 48/100 | 3 days ago | |
| grpc/grpcsrc/core/AGENTS.md · 45k | AGENTS.md | stylearch | 59/100 | 3 days ago |
Diff against src/core/ext/filters/census/AGENTS.md Diff against src/core/ext/filters/gcp_authentication/AGENTS.md Diff against src/core/ext/filters/http/AGENTS.md Diff against src/core/ext/filters/stateful_session/AGENTS.md Diff against src/core/ext/transport/chaotic_good/AGENTS.md Diff against src/core/ext/transport/inproc/AGENTS.md Diff against src/core/filter/AGENTS.md Diff against src/core/handshaker/AGENTS.md Diff against src/core/server/AGENTS.md Diff against src/core/service_config/AGENTS.md Diff against src/core/telemetry/AGENTS.md Diff against src/core/transport/AGENTS.md Diff against src/core/credentials/transport/AGENTS.md Diff against src/core/ext/filters/backend_metrics/AGENTS.md Diff against src/core/credentials/AGENTS.md Diff against src/core/tsi/AGENTS.md Diff against src/core/tsi/alts/AGENTS.md Diff against src/core/credentials/call/AGENTS.md Diff against src/core/ext/transport/chttp2/AGENTS.md Diff against src/core/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| vllm-project/vllmAGENTS.md · 88k | AGENTS.md | setuptestlint-formatstyle+5 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| react/react-nativepackages/react-native-compatibility-check/AGENTS.md · 126k | AGENTS.md | testlint-formatstylearch+4 | 99/100 | 3 days ago | |
| netdata/netdatasrc/go/plugin/ibm.d/AGENTS.md · 80k | AGENTS.md | buildtestlint-formatarch+3 | 99/100 | 3 days ago | |
| dragonflydb/dragonflyAGENTS.md · 31k | AGENTS.md | setupbuildtestlint-format+10 | 96/100 | 2 days ago | |
| dotnet/aspnetcoresrc/Components/AGENTS.md · 38k | AGENTS.md | buildteststylearch+3 | 96/100 | 3 days ago | |
| duckdb/duckdbAGENTS.md · 40k | AGENTS.md | buildtestlint-formatstyle+8 | 96/100 | today | |
| steipete/CodexBarAGENTS.md · 20k | AGENTS.md | buildteststylearch+4 | 93/100 | 3 days ago |
