All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC PATCH 05/10] .agents/skills: add qemu-build skill
Date: Wed, 06 May 2026 17:38:14 +0100	[thread overview]
Message-ID: <87bjesmr2h.fsf@draig.linaro.org> (raw)
In-Reply-To: <8685c75f-09eb-4c05-a109-f16eca871999@oracle.com> (Alejandro Jimenez's message of "Wed, 6 May 2026 11:48:12 -0400")

Alejandro Jimenez <alejandro.j.jimenez@oracle.com> writes:

> On 5/5/26 1:01 PM, Alex Bennée wrote:
>> This provides basic instructions for building QEMU.
>> 
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  .agents/skills/qemu-build/SKILL.md | 50 ++++++++++++++++++++++++++++++
>>  1 file changed, 50 insertions(+)
>>  create mode 100644 .agents/skills/qemu-build/SKILL.md
>> 
>> diff --git a/.agents/skills/qemu-build/SKILL.md b/.agents/skills/qemu-build/SKILL.md
>> new file mode 100644
>> index 00000000000..a78678ff632
>> --- /dev/null
>> +++ b/.agents/skills/qemu-build/SKILL.md
>> @@ -0,0 +1,50 @@
>> +---
>> +name: qemu-build
>> +description: Provides step-by-step instructions on configuring and
>> building QEMU. You MUST trigger this skill whenever the user asks to
>> build QEMU or debug build failures. It includes critical details on
>> build directory reuse and spawning sub-agents.
>> +license: GPL-2.0-or-later
>> +---
>> +
>> +# Instructions
>> +
>> +## Examining and Re-using Build Directories
>> +Before creating a new build directory, check if an existing one can be re-used. QEMU uses out-of-tree builds, typically in `build` or `builds/` sub-directories.
>> +
>> +1. **Check existing configs**: You can examine how an existing
>> build directory was configured by checking its `config.log`. Run
>> `head -n 2 builds/<dir>/config.log`. The second line typically
>> contains the full `../configure` command line used.
>> +2. **Re-use and Reconfigure**: You have latitude to re-use existing
>> directories when appropriate (e.g., `builds/debug` which is a
>> general-purpose debug directory for whatever is currently going on).
>> If an existing directory has the right flags (like debug/sanitizers)
>> but the wrong target list, you can reconfigure it to keep the same
>> config but change the `--target-list`:
>> +   ```bash
>> +   cd builds/debug
>> +   # Check the old config.log, then re-run configure with the new target-list
>> +   ../../configure <old-flags> --target-list=<new-targets>
>> +   ```
>> +
>> +## Launching Builds
>> +**Crucial**: You MUST NEVER run builds directly in the main agent context. You MUST ALWAYS launch them by spawning a sub-agent using the `eca__spawn_agent` tool.
>
> "ECA heritage" showing with the eca__spawn_agent mention. Ending the
> sentence after "sub-agent" is likely enough for the model to do the right
> thing based on its available tools?
>
>> +Always use the `qemu-helper-agent` for these tasks.

And this is on my personal config as well ;-)

I have added a rule to my config:

  ---
  paths: 
    - "/home/alex/lsrc/qemu.git/**"
  ---

  There is a qemu-helper-agent for use in QEMU related tasks.
  Use `env GITLAB_TOKEN=$(pass gitlab-api)` to pass the auth token for glab actions.

And cleaned up the references from the project agent skills.

>> +Pass the specific build commands, along with the required working directory, in the `task` argument. Give the subagent explicit instructions on what to verify and what to report back to you.
>> +For example: `task: "Navigate to builds/debug and run ninja. If it fails, report the exact compiler errors."`
>> +
>> +## Configuring a New Build
>> +If no suitable build directory exists, create a new one.
>> +
>> +1. **Create build directory**: `mkdir -p builds/test-target; cd builds/test-target`
>> +2. **Basic Configure**: `../../configure --target-list=[list of targets]`
>> +   - Common targets: `x86_64-softmmu`, `aarch64-softmmu`, `riscv64-softmmu`, `x86_64-linux-user`.
>> +3. **Common Options**:
>> +   - `--enable-debug-info`: Include symbols.
>> +   - `--enable-debug`: Enable assertions.
>> +4. **Sanitizers**:
>> +   - `--enable-asan`: Address Sanitizer.
>> +   - `--enable-tsan`: Thread Sanitizer.
>> +   - `--enable-ubsan`: Undefined Behavior Sanitizer.
>> +
>> +## Building
>> +**Important**: Always re-run the build after making changes to the source code.
>> +
>> +## Reporting Results
>> +**Crucial**: After completing the build task, provide a concise summary of the results to the calling agent.
>> +1. **Summary**: State whether the build passed or failed.
>> +2. **Failure Excerpts**: If the build fails, include relevant excerpts from the logs (e.g., compiler errors).
>> +3. **Full Paths**: Always provide the **absolute file paths** to the full logs for further inspection.
>> +
>> +## Debugging and Environment
>> +- **Verbose**: `V=1` for detailed output.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-05-06 16:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 17:00 [RFC PATCH 00/10] AGENTS.md and associated skills Alex Bennée
2026-05-05 17:00 ` [RFC PATCH 01/10] AGENTS.md: add basic AGENTS.md for QEMU Alex Bennée
2026-05-06  8:49   ` Philippe Mathieu-Daudé
2026-05-05 17:00 ` [RFC PATCH 02/10] .agents/skills: add qemu-code-explorer skill Alex Bennée
2026-05-05 17:00 ` [RFC PATCH 03/10] .agents/skills: add qemu-code-reviewer skill Alex Bennée
2026-05-06  8:25   ` Philippe Mathieu-Daudé
2026-05-05 17:00 ` [RFC PATCH 04/10] .agents/skills: add qemu-issue-helper skill Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 05/10] .agents/skills: add qemu-build skill Alex Bennée
2026-05-06 15:48   ` Alejandro Jimenez
2026-05-06 16:38     ` Alex Bennée [this message]
2026-05-05 17:01 ` [RFC PATCH 06/10] .agents/skills: add qemu-testing skill Alex Bennée
2026-05-07  8:03   ` Daniel P. Berrangé
2026-05-07 11:57     ` Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 07/10] .agents/skills: add skill to distil mail threads Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 08/10] .agents/skills: add qemu-issue-triage agent skill Alex Bennée
2026-05-07  8:25   ` Daniel P. Berrangé
2026-05-07  9:20     ` Philippe Mathieu-Daudé
2026-05-07  9:32       ` Daniel P. Berrangé
2026-05-07 12:32     ` Alex Bennée
2026-05-07 12:59       ` Peter Maydell
2026-05-07 13:46       ` Daniel P. Berrangé
2026-05-05 17:01 ` [RFC PATCH 09/10] .agents/skills: add checkpatch " Alex Bennée
2026-05-05 17:01 ` [RFC PATCH 10/10] MAINTAINERS: add a section for AI agents Alex Bennée
2026-05-07  8:59 ` [RFC PATCH 00/10] AGENTS.md and associated skills Peter Maydell
2026-05-07  9:24   ` Philippe Mathieu-Daudé
2026-05-07  9:27     ` Daniel P. Berrangé
2026-05-07  9:38   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bjesmr2h.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.