This series adds AI-powered code review tools to assist contributors
and maintainers in validating patches against DPDK coding standards
before submission.

The tools leverage large language models from multiple providers to
analyze patches and documentation for compliance with DPDK guidelines.
By catching common issues early, these tools can reduce review cycles
and improve overall patch quality.

Key features:
- Multi-provider support: Anthropic Claude, OpenAI ChatGPT,
  xAI Grok, and Google Gemini
- Review patches against comprehensive AGENTS.md guidelines
- Review documentation for spelling, grammar, and clarity
- Multiple output formats: text, markdown, html, json
- Email integration via SMTP using git sendemail configuration
- Cross-provider comparison for evaluating review consistency

The AGENTS.md document consolidates DPDK contribution requirements
from multiple sources (patches.rst, coding_style.rst, check-git-log.sh,
checkpatches.sh) into a structured format optimized for AI review
tools. Severity levels align with existing validation scripts.

All scripts are implemented in Python using only standard library
modules, requiring no external dependencies beyond the AI provider
API keys.

Usage examples:

  # Review a patch
  ./devtools/analyze-patch.py 0001-net-ixgbe-fix-something.patch

  # Use a different provider
  ./devtools/analyze-patch.py -p openai my-patch.patch

  # Compare reviews across all configured providers
  ./devtools/compare-reviews.sh -o ./reviews my-patch.patch

  # Review documentation and generate diff
  ./devtools/review-doc.py doc/guides/nics/ixgbe.rst
  git apply ixgbe.diff && git commit -sF ixgbe.msg

  # Send review to mailing list
  ./devtools/analyze-patch.py --send-email --to [email protected] patch.mbox


v6 - add output format options
   - add send-email option
   - use python rather than shell

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.py   | 733 ++++++++++++++++++++++++++++
 devtools/compare-reviews.sh | 192 ++++++++
 devtools/review-doc.py      | 892 ++++++++++++++++++++++++++++++++++
 4 files changed, 2756 insertions(+)
 create mode 100644 AGENTS.md
 create mode 100755 devtools/analyze-patch.py
 create mode 100644 devtools/compare-reviews.sh
 create mode 100755 devtools/review-doc.py

-- 
2.51.0

Reply via email to