On Wed, 18 Feb 2026 09:59:21 -0500
Aaron Conole <[email protected]> wrote:

> Much of the following sections can be written as part of checkpatch,
> which means we don't need to spend compute resources with the AI on it.
> For example, telling the AI that source files need to begin with SPDX
> identifiers, line lenghts, tag format order, tag parsing, etc.  The
> downside is that if we ask the AI to *generate* code, then it won't
> follow these rules; but when we ask AI to *review* the code, it takes
> fewer tokens to submit and we can let the AI do the thing it really
> shines at - recognizing subtle patterns, rather than stuff we can write
> a python script to do.

Well, checkpatch is slow, misses somethings and doesn't provide any
good rationale back to developer. My experience is that the cost of
AI is per-input token. And AGENTS.md is also integrated into IDE's
like Visual Studio so it will get coverage there where checkpatch
will not.

> 
> I'm approaching this from the perspective of running CI using this
> AGENTS.md file - but I might be wrong on the scope of this one, as it
> may be intended for something else (like using some IDE integrated
> extensions where that stuff can make sense to guide generation).

I was starting look at kernel review-prompts then making sure
other anti-patterns in DPDK got covered.

> 
> As for the CI reviewing part, napkin math for Anthropic API shows this
> takes up about .30c / patch (~17k tok) we would submit, and that doesn't
> include whatever the patch context is - so I think we would exhaust any
> budget dedicated to this really early (probably within a few dozen
> patches).

For any reasonable size patchset I end up splitting.
For me having more through review is higher priority than keeping cost
down (at this point).

> 
> Maybe it's possible to split up the AGENTS.md file into stuff that's
> good for review and stuff that's good for generation.  WDYT?

Yes and no. Yes it could be split, but I use it for patch and existing
code review already. This is a bigger question, what do other projects do?
Being a "trail blazer" in this area is just extra wasted effort.

Reply via email to