[LTP] [PATCH v4] agents: Add AI agent configuration for code reviews

Andrea Cervesato andrea.cervesato@suse.com
Wed Feb 18 13:52:07 CET 2026


Hi,

I think this configuration is working pretty well as a starting point.

---

The setup I'm using to test it is the following:

1. install OpenCode from https://opencode.ai/ (npm is the fastest way)
2. open OpenCode in the LTP repo folder
3. configure OpenCode to make sure we can modify the current repo

    $ cat .config/opencode/opencode.json 
    {
      "$schema": "https://opencode.ai/config.json",
      "permission": {
        "*": "ask",
      }
    }

   In this way, we make sure that we have control on what the LLM will
   do on our folder. The LLM will ask for permissions when it will
   read/write files or download patches in our system.

   I know it's possible to give sudo permissions, but it sounds like a
   bad idea to me.

4. setup OpenCode in Build mode (TAB), so it's possible to modify the
  current folder. This is needed in order to apply patches in the
  current LTP directory.
5. CTRL+x-m to select the Model we want to use.
6. provide to the LLM a link to patchwork/lore to start a code review on
   a developer patch
7. provide the commit/branch on the local repo if you want to review the
  current work you are working on

---

To test this patch, it's better to apply it on a new branch and
explicitly tells to the LLM that we want to always start a review from
this new branch containing the agents configuration. For example,
tells to LLM:

    "ALWAYS start a review from the branch <my branch> instead of master"

All reviews will create a new branch starting with "review/" prefix and
they won't be removed lately. In this way, it's possible to review logic
flaws in the patch after an initial LLM review.

---

Please take a look at it and let me know what we can improve. I would
like to merge this patch-set pretty soon in order to start using it and
save a lot of time to review the most common errors.


Kind regards,
-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com



More information about the ltp mailing list