qemu-modeler
Skill60 starsChanged 13 days agoMITView on GitHub
Use when starting or resuming an end-to-end QEMU device, board, SoC, or firmware modeling task; it decomposes the real goal into milestones and evidence-backed acceptance criteria, orchestrates evidence extraction, RS-IR translation, domain-skill execution, debugging, independent review, feedback capture, and the goal loop until every AC is proven or a real stop condition is reached.
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read the goal contract, the phase protocol, and the round loop in full before starting.
- Very specific: line 70
Plan the goal loop, not just one round: Write the current round objective, the AC it advances, the verification gate, the expected …
- Very specific: line 104
If the host agent supports a persistent goal/loop primitive, bind it to loop-state.sh loop.
- Distinctive: line 117
Run the phases in phase-protocol.md:
- Distinctive: line 119
Evidence and contract: Before modeling, obtain the source-cited register contract and, when the handoff is structural, the RS-IR.
- Very specific: line 122
Use qemu-register-extraction for register semantics and those domain skills when installed.
- Very specific: line 132
Build and test: Use the named build directory and the narrowest gate: targeted build, qtest, boot marker, then workload evidence.
- Very specific: line 135
Debug: When a gate fails, classify first (environment, stale input, command/ABI, topology, device semantics, TCG, guest) and use qemu-debug …
- Distinctive: line 153
Do not claim PASS without a configured marker or a falsifiable qtest.
- Distinctive: line 155
Do not count a logging sink, an unimplemented placeholder, or a boot banner as modeled behavior.
- Very specific: line 161
Run loop-state.sh loop after each round: CONTINUE means start the next round.
- Distinctive: line 165
Run the review before advancing a round.
- Very specific: line 167
Keep the state file append-only for rounds and findings.
- Very specific: line 189
If qemu-workflow is installed, also run its scripts/gates.sh workspace, audit-sections, round-result, marker, and handoff gates.
- Distinctive: line 196
Stop and hand off only when: every AC has evidence-backed PASS and every milestone is done.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
QEMU Modeler
This is the top-level entry for a complete modeling task. It does not replace the domain skills: it decides which of them to load, in what order, what each must produce, and when a round may advance. Use it when the user says "model this device/board", "bring this machine up", "continue the modeling", or "run the next round", rather than invoking one domain skill in isolation.
Read the goal contract, the phase protocol, and the round loop in full before starting. Create the task state from the state template and keep it current with loop-state.sh.
Audit workflow
For a non-trivial task that writes to the workspace, use only the needed entries under
.oh-my-qemu/<task-slug>/: audit.md (baseline, plan, decisions, evidence, verification, and
gaps), commands.md (redacted commands, working directories, and results), logs/ (decisive
build, test, and runtime output), scripts/ (probes, parsers, and harnesses), and output/
(generated deliverables, third-party dependencies, and non-QEMU binaries). Keep QEMU's own build
tree at source-root builds/build-<target>/, never an unqualified build/. In a Git worktree,
add .agents/, .oh-my-qemu/, and builds/ to the file from
git rev-parse --git-path info/exclude before writing artifacts or configuring QEMU; preserve
existing entries and avoid duplicates. Never stage or commit these paths; stage source only when
the user explicitly requests that separate action. At handoff, reconcile git status --short
with the baseline and report the task directory, build directory, source changes, pre-existing
changes, and unresolved gaps.
QEMU upstream boundary
QEMU's official GitLab and mailing lists are upstream channels. A patch becomes an upstream
contribution when it is sent to the maintainers selected through MAINTAINERS. Do not prepare or
send agent-generated code, documentation, commit messages, or patches for upstream submission; see
the checked-out tree's docs/devel/code-provenance.rst. Research, debugging, analysis, local
experiments, verification, and workflow guidance remain allowed. Local branches, commits, patch
files, pushes, and pull requests are not by themselves upstream contributions; perform those Git
actions only when requested.
Start or resume
- Classify, freeze the goal, and decompose it. Record the task type
(board/SoC bring-up, peripheral/register model, TCG, firmware chain,
image/rootfs, debug-only, documentation), provenance intent, allowed paths,
the real end-state goal, 2-5 milestones, and falsifiable ACs with their
evidence forms in
audit.md. A round is not a goal; "finish Round N" is not completion. If this is a continuation, read the previousoutput/task-state.md,output/acceptance.tsv,output/milestones.tsv, the lastround-result.md, and unresolved gaps before planning. - Create the state file. Copy
the state template to
.oh-my-qemu/<task-slug>/output/task-state.md, or runbash <skill-dir>/scripts/loop-state.sh init .oh-my-qemu/<task-slug>. Set the goal and default goal loop withloop-state.sh goal .oh-my-qemu/<task-slug> "<goal>" goal, then add milestones and ACs with themilestone addandac addcommands. - Route. Choose the smallest set of domain skills from
the routing table. Load them when
available. If a named or required skill is not installed, record
missing skill: <name>inaudit.mdand continue with the nearest available rules; never improvise a skill's rules or claim it was used. - Plan the goal loop, not just one round. Write the current round
objective, the AC it advances, the verification gate, the expected evidence,
and the review request in
audit.md. After the round, runloop-state.sh loop; keep starting rounds while it printsCONTINUE, and stop only onPASS goal completeor a real stop condition. Do not pause to ask "continue?" while ACs or milestones remain.
Goal contract
Complete the goal, not a round count. Keep all four levels visible:
- Goal: the real observable end state, not "finish Round N" and not a build/command alone.
- Milestones (2-5): checkpoints that unlock the next stage. Each has an exit
gate;
donerequires evidence (the gate/artifact), and marking one done does not complete the goal. Any AC/milestone/evidence or blocker finding change resetsreview status; record a fresh review verdict before claiming completion. - Acceptance criteria: falsifiable outcomes with named evidence (qtest,
marker, trace, log, artifact).
passrequires non-empty evidence; a round objective must name the AC it advances. - Rounds: the smallest coherent steps; they are progress units, not completion signals.
The goal is complete only when every AC has evidence-backed PASS, every
milestone is evidence-backed done, no BLOCKER finding is unresolved, the current
review status is PASS, and the latest round verdict is PASS. A later
FAIL/INCONCLUSIVE round keeps the goal active even if older AC rows are still
satisfied. The acceptance,
milestone, and state files are the machine-readable contract; use
loop-state.sh loop as the continue/complete oracle. The default is goal
mode; use round mode only when the user explicitly asks for exactly one
round and a handoff.
If the host agent supports a persistent goal/loop primitive, bind it to
loop-state.sh loop; otherwise call the command after every round. When it
prints CONTINUE, immediately plan and start the next round—do not pause to ask
the user whether to continue.
A BLOCKER remains a goal blocker until it is fixed and marked resolved with
loop-state.sh finding resolve <task> <id>; open blockers are counted by
loop/check. In round mode (explicit single-round request), loop reports
ROUND COMPLETE and returns 0 after the round—hand off instead of starting
another round.
Phase protocol
Run the phases in phase-protocol.md:
- Evidence and contract. Before modeling, obtain the source-cited register
contract and, when the handoff is structural, the RS-IR. For a board, obtain
the memory map, boot contract, unimplemented-window plan, and image inputs.
Use
qemu-register-extractionfor register semantics and those domain skills when installed; otherwise record the evidence gap. - Translation. Validate the RS-IR, run its
--translateworklist, and turn it into the implementation map: RegisterInfo/manual-MMIO mechanism, hook, unimplemented placeholder, trace/log/error policy, and qtest. Readqemu-peripheral-modeling's translation reference andqemu-board-modeling's unimplemented-device reference when available. - Implement. Execute the domain skill for the object (peripheral, board, TCG, image, firmware chain) with one narrow round. Keep source changes to the requested deliverable; keep artifacts in the audit workspace.
- Build and test. Use the named build directory and the narrowest gate:
targeted build, qtest, boot marker, then workload evidence. Capture decisive
logs under
logs/. - Debug. When a gate fails, classify first (environment, stale input,
command/ABI, topology, device semantics, TCG, guest) and use
qemu-debugwhen installed. Do not edit the model to mask a wrong command, image, or host issue. - Independent review. Invoke
qemu-model-reviewon the round packet (plan, diff, RS-IR/translation, tests, logs) using the review request template. Treat its findings as blocking when BLOCKER, and record a re-review after fixes. Self-review alone is not sufficient for a PASS. - Feedback and next round. Record reusable workflow friction; use
qemu-agent-feedbackfor a sanitized proposal only when the user requests or approves filing. Decide the next action: continue, narrow a probe, replan, or stop. - Hand off. Report PASS/FAIL/INCONCLUSIVE per acceptance criterion, evidence paths, the translation/review state, remaining gaps, and the exact next action.
Hard rules
- Do not claim PASS without a configured marker or a falsifiable qtest; a timeout, an empty serial log, or "no crash" is INCONCLUSIVE.
- Do not count a logging sink, an unimplemented placeholder, or a boot banner as modeled behavior.
- One round, one objective; a failed gate stays in the current round, but a multi-stage blocker triggers a replan instead of an oversized round.
- A round count is not a goal. Do not stop after Round 0/1/2 or at a round budget; replan and continue the goal loop while ACs or milestones remain.
- Run
loop-state.sh loopafter each round:CONTINUEmeans start the next round;PASS goal completemeans every AC is evidence-backed and every milestone is done. Do not ask the user to "continue" when the answer is already CONTINUE. - Run the review before advancing a round. A reviewer that only restates the round summary is not a review.
- Keep the state file append-only for rounds and findings; preserve the previous
round-result.mdandcommands.mdhistory. - Respect the provenance boundary: local-only work never becomes upstream-ready by accident, and no upstream submission is prepared here.
State and gates
output/task-state.md: goal, goal mode, phase, round, objective, gate, blockers, next action, skills used and missing.output/milestones.tsv: milestone id, status, exit description, evidence, updated;donewithout evidence is rejected.output/acceptance.tsv: AC id, status, criterion, evidence, updated.output/findings.tsv: review findings with open/resolved status; resolved blockers stop blocking completion after fixes and re-review.output/rounds.tsv: append-only round log written byloop-state.sh.loop-state.sh loop: prints CONTINUE or PASS goal complete; use it as the goal-completion oracle. Goal completion requires the latestrounds.tsvverdict to belong to the current round and be PASS; starting a new round resetsreview status, so an old PASS cannot complete a fresh round. In round mode it prints ROUND COMPLETE only after the requested round's own round-result, not a historical one.output/round-result.mdandoutput/evidence-manifest.tsv: round evidence.- If
qemu-workflowis installed, also run itsscripts/gates.shworkspace, audit-sections, round-result, marker, and handoff gates. If it is not installed, runbash <skill-dir>/scripts/loop-state.sh showand the review checks, and record the gate gap.
Stop conditions
Stop and hand off only when: every AC has evidence-backed PASS and every milestone is done; the user's requested scope is complete; a concrete external input/authority is missing; the user explicitly stops; or continuing would violate the provenance boundary. A round budget is a design checkpoint, not a stop condition: summarize, replan, and continue. A stop with INCONCLUSIVE is valid only when it names the missing evidence and the next narrow command, and it is not the same as completing the goal.
Upstream references
- QEMU code provenance:
docs/devel/code-provenance.rst. - QEMU testing:
docs/devel/testing/main.rstanddocs/devel/testing/qtest.rst. - Tracing:
docs/devel/tracing.rst. - GDB and replay:
docs/system/gdb.rst,docs/system/replay.rst.
Paths can differ between QEMU versions; locate them in the checked-out tree.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- qemu-agent-feedbackSkill
- qemu-board-modelingSkill
- qemu-boot-runSkill
- qemu-buildSkill
- qemu-debugSkill
- qemu-imageSkill
- qemu-kernel-buildSkill
- qemu-linux-bootSkill
- qemu-model-reviewSkill
- qemu-model-verificationSkill
- qemu-peripheral-modelingSkill
- qemu-qtestSkill
- qemu-register-extractionSkill
- qemu-rst-documentationSkill
- qemu-tcg-backendSkill
- qemu-tcg-frontendSkill
- qemu-uboot-buildSkill
- qemu-workflowSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

