This series adds tools to enable AI-assisted code review for DPDK
contributions. The goal is to help contributors validate their patches
against DPDK coding standards before submission, reducing review cycles
and improving patch quality.
The series consists of:
1. AGENTS.md - A structured reference document that consolidates DPDK
coding standards, commit message requirements, and validation rules
into a machine-readable format. This serves as the knowledge base
for AI review tools.
2. analyze-patch.sh - Reviews patches against AGENTS.md guidelines.
Supports multiple AI providers (Anthropic Claude, OpenAI ChatGPT,
xAI Grok, Google Gemini) for flexibility and comparison.
3. compare-reviews.sh - Utility script to run reviews across all
configured AI providers simultaneously for comparison.
4. review-doc.sh - Reviews documentation files for spelling, grammar,
and technical correctness. Produces ready-to-apply diffs and
compliant commit messages.
Usage requires an API key from at least one supported provider:
export ANTHROPIC_API_KEY=...
# or: OPENAI_API_KEY, XAI_API_KEY, GOOGLE_API_KEY
./devtools/analyze-patch.sh my-patch.patch
./devtools/review-doc.sh doc/guides/prog_guide/mempool_lib.rst
The multi-provider design allows users to:
- Choose their preferred AI service
- Compare feedback quality across providers
- Avoid vendor lock-in
These tools complement existing validation infrastructure
(checkpatches.sh, check-git-log.sh) by providing semantic review
capabilities that static analysis cannot offer.
Future work could include:
- Integration with CI pipelines
- Mailing list integration for automated review comments
- Fine-tuning prompts based on common review feedback
- Better updating and error handling.
AI providers are not stable.
- Integration into contributing documentation
Stephen Hemminger (4):
doc: add AGENTS.md for AI-powered code review tools
devtools: add multi-provider AI patch review script
devtools: add script to compare AI reviews across providers
devtools: add multi-provider AI documentation review script
AGENTS.md | 939 ++++++++++++++++++++
devtools/analyze-patch.sh | 534 ++++++++++++
devtools/compare-reviews.sh | 153 ++++
devtools/review-doc.sh | 734 ++++++++++++++++
4 files changed, 2360 insertions(+)
create mode 100644 AGENTS.md
create mode 100755 devtools/analyze-patch.sh
create mode 100755 devtools/compare-reviews.sh
create mode 100755 devtools/review-doc.sh
Stephen Hemminger (4):
doc: add AGENTS.md for AI-powered code review tools
devtools: add multi-provider AI patch review script
devtools: add script to compare AI reviews across providers
devtools: add multi-provider AI documentation review script
AGENTS.md | 939 ++++++++++++++++++++++++++++++++++++
devtools/analyze-patch.sh | 534 ++++++++++++++++++++
devtools/compare-reviews.sh | 153 ++++++
devtools/review-doc.sh | 734 ++++++++++++++++++++++++++++
4 files changed, 2360 insertions(+)
create mode 100644 AGENTS.md
create mode 100755 devtools/analyze-patch.sh
create mode 100755 devtools/compare-reviews.sh
create mode 100755 devtools/review-doc.sh
--
2.51.0