yuqi1129 opened a new pull request, #11339: URL: https://github.com/apache/gravitino/pull/11339
### What changes were proposed in this pull request? Distill recurring code-review feedback from recent PRs into `AGENTS.md` so future contributions follow the project's conventions up front. New/expanded guidance: - **Code design**: method granularity, no dead params/methods, `this.` field assignment, narrowest visibility, dependency injection over singletons, reuse of existing DTOs/POs, correct exception types, standard-library idioms (`StringUtils`/`Set`/`Base64`), capability interfaces, component placement & lifecycle, removing superseded code. - **Test-only code**: keep it in the test module or use `@VisibleForTesting`; no reflective access to non-public members from tests. - **Configuration**: document new `ConfigEntry` keys and stub them in mocked-`Config` tests; validate at the entry, not downstream. - **Concurrency & background tasks**: `AtomicBoolean` lifecycle flags, guarded shared state, self-protecting scheduled tasks, bounded thread pools. - **API/errors/performance**: `Optional` over null, don't discard return values, minimize IO round-trips, bounded memory, no test-scoped libs in main code. - **Documentation & PR hygiene**: usage-focused guides, consistent terminology, runnable examples, keep PRs focused. ### Why are the changes needed? Several of these points (for example, `checkArgument` over `checkNotNull`, `@VisibleForTesting` for test-only members, avoiding singletons, documenting/stubbing new configs) recurred across recent reviews. Capturing them in the agent guidelines reduces repeated review churn. ### Does this PR introduce _any_ user-facing change? No. Documentation only (`AGENTS.md`). ### How was this patch tested? N/A — documentation only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
