Add agents configuration for code reviews
PATCH v2 1/1 Add agents configuration for code reviews
From: Andrea Cervesato <[email protected]>
Add agents configuration generated from the LTP documentation using Claude Code. The agents/ folder has been added in order to split agents configuration from the actual documentation and it's pointed via AGENTS.md file in the root folder. This is enough to use OpenCode in the main LTP root folder and to start reviewing LTP code.
The code reviews (obviously) differ between models, so it's really hard to say what model should be used and what not. But, for sure, Claude Code provides great features at a really high price. For this reason, it's worth to mention that the reviewiers job should be done both by developers, before sending patches, and by reviewers, in a second moment.
Realy important, we should probably find an open source model alternative that is "good enough" for our purpose.
NOTE: at the moment, agents/ and doc/ folders are overlapping information, so we might start to think how to create an AGENTS.md that directly points to a re-structured doc/ folder, simplified enough so agents can use it as a reference, instead of having a double folder.
---
Changes in v2:
- rewrite the entire agents/ structure to reduce the LLM allucination
and to focus on reviews only
- AGENTS.md now is defining basic project usage and it points to the agents/review.md for review requests
- Link to v1: https://lore.kernel.org/r/[email protected]
--- AGENTS.md | 99 ++++++++++++++++++++++++++++++++++++++++ agents/c-tests.md | 121 +++++++++++++++++++++++++++++++++++++++++++++++++ agents/ground-rules.md | 71 +++++++++++++++++++++++++++++ agents/review.md | 50 ++++++++++++++++++++ agents/shell-tests.md | 95 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 436 insertions(+)
AGENTS.md new file +99 -0
@@ -0,0 +1,99 @@ +# Linux Test Project (LTP) + +LTP delivers tests to the open source community that validate the +reliability, robustness, and stability of the Linux kernel and related +features. Tests are written in C or portable POSIX shell. The project uses +GNU Autotools for its build system and follows the Linux kernel coding style. + +**License**: GPL-2.0-or-later (`SPDX-License-Identifier: GPL-2.0-or-later`) + +## Technology Stack + +- **Languages**: C (primary), portable POSIX shell +- **Build system**: GNU Autotools (autoconf, automake, make) +- **Compiler**: gcc (clang also supported in CI) +- **Coding style**: Linux kernel coding style +- **Test runner**: kirk (replacing legacy `runltp`) +- **Documentation**: reStructuredText + Sphinx + +## Project Structure + +- `testcases/` - All test binaries (C and shell) + - `testcases/kernel/syscalls/` - Syscall and libc wrapper tests + - `testcases/open_posix_testsuite/` - Open POSIX testsuite fork + - `testcases/lib/` - Shell test library and shell loader +- `include/` - LTP library headers (`tst_test.h` is the main API) + - `include/lapi/` - Fallback kernel API definitions for older systems + - `include/mk/` - Build system include files +- `lib/` - LTP C library source (`tst_*.c` files) + - `lib/newlib_tests/` - LTP library self-tests +- `runtest/` - Runtest files defining test suites (e.g. `syscalls`, `mm`) +- `scenario_groups/` - Default sets of runtest files +- `doc/` - Sphinx documentation (RST format) +- `infrastructure/` - Terraform configs (if present) +- `scripts/` - Helper scripts +- `ci/` - CI dependency installation scripts +- `.github/workflows/` - GitHub Actions CI workflows +- `tools/` - Release and maintenance tools +- `agents/` - AI Agents configurations + +## Environment Setup + +### Prerequisites + +- git +- autoconf, automake, m4 +- make +- gcc +- pkgconf / pkg-config +- libc headers +- linux headers + +### Download Source + +```sh +git clone --recurse-submodules https://github.com/linux-test-project/ltp.git +cd ltp +``` + +### Build from Source + +```sh +make autotools +./configure +make +``` + +### Install (default prefix: /opt/ltp) + +```sh +make install +``` + +### Rebuild from Scratch (required after build system changes) + +```sh +make autotools +./configure +make +``` + +## FILE LOADING INSTRUCTIONS + +### Code review (ALWAYS LOAD WHEN PATCH REVIEW IS REQUESTED) + +- `agents/review.md` - Entry point for the review agent + +## Additional Resources + +- Documentation: https://linux-test-project.readthedocs.io/ +- Source code: https://github.com/linux-test-project/ltp +- Mailing list: https://lore.kernel.org/ltp/ +- Patchwork: https://patchwork.ozlabs.org/project/ltp/list/ +- Kirk (test runner): https://github.com/linux-test-project/kirk +- Linux kernel coding style: https://www.kernel.org/doc/html/latest/process/coding-style.html + +For detailed API reference, see `doc/developers/api_c_tests.rst` and +`doc/developers/api_shell_tests.rst`. +For build system details, see `doc/developers/build_system.rst`. +For test writing tutorial, see `doc/developers/test_case_tutorial.rst`.
agents/c-tests.md new file +121 -0
121 lines not on this page · raw message
agents/ground-rules.md new file +71 -0
71 lines not on this page · raw message
agents/review.md new file +50 -0
50 lines not on this page · raw message
agents/shell-tests.md new file +95 -0
95 lines not on this page · raw message
---
base-commit: ef0d9ed8b19b9e32dc9ee6c0a3b14983bc387fd1
change-id: 20260215-agents_file-344bdc3300d0
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp