Skip to content

Bootstrap agentic development workflow - #150

Merged
twells46 merged 3 commits into
masterfrom
oscar/agent-scaffolding
Oct 12, 2026
Merged

twells46 merged 3 commits into
masterfrom
oscar/agent-scaffolding

Conversation

@objorkman

Copy link
Copy Markdown
Collaborator

Summary

Bootstraps agentic development for botui the same way as Wombat-Firmware (kipr/Wombat-Firmware#9): shared instructions for contributors and the AI coding agents many of them now use, plus a build-and-verify loop that works without a Wombat. There are no botui source changes.

Needs maintainer sign-off: contribution process

CONTRIBUTING.md matches Wombat-Firmware's except for its last section, so it sets the same process here: owner-named branches (<name>/<topic>), a reviewed plan before anything beyond a small fix, focused changes with no drive-by reformatting, comments only where the code can't speak for itself, documentation updated in the same PR, and PRs that say plainly what wasn't tested. The botui-specific section says CI only checks that botui compiles, that behavior on a Wombat needs testing on a Wombat, and that changing a file shared with wombat-os or libwallaby needs a paired PR there.

Changes

  • AGENTS.md: what botui is, the build, how to verify a change, architecture (screen stack, device layer, running programs, NetworkManager over D-Bus), a table of the paths and scripts shared with wombat-os and libwallaby, which classes are dead Kovan-era code, and gotchas (mixed formatting, string-based connect() failing at runtime, a UI thread that blocks on system commands). CLAUDE.md and GEMINI.md import it, so each tool reads the same instructions.
  • Docker build (Dockerfile, docker-compose.yml, build.sh): Ubuntu 24.04 with its Qt 6.4 packages. It builds libkar v1.0.0, pcompiler v1.0.0, and libwallaby v1.2.1 from source (the versions wombat-os lists), then botui into deploy/botui. Run it with docker compose build && docker compose run --rm build-botui. libwallaby's bundled libav is built with --disable-asm (a one-line patch in the Dockerfile), because its x86 inline assembly doesn't assemble with Ubuntu 24.04's binutils.
  • scripts/screenshot.sh: runs the built botui on a virtual 800×480 display inside the image, taps given coordinates, and saves a screenshot after each tap. Agents (and people) can check UI changes without a Wombat.
  • CI (.github/workflows/build.yml): builds every PR with the same image, launches botui, fails if it crashes at startup, and uploads the home-screen screenshot and log.
  • Removed action.yml and bob.yml: action.yml is invalid YAML and fails on every push; bob.yml waits 24 hours for a self-hosted runner and is cancelled on every push. The README badge now points at the new workflow.
  • README.md: current requirements (it listed Qt 4.7 and CMake 2.6), the Docker build, and a link to CONTRIBUTING.md.
  • Devcontainer: the same setup as Wombat-Firmware.

What the Docker build is, and isn't

It's a compile check and a way to run botui off-device. Its binary doesn't run on a Wombat, because the Wombat has its own Qt 6 build and older system libraries. The botui.deb that wombat-os ships was built with GCC 9.4 against a Qt 6 tree at /home/qtpi/qt-raspi and packaged with CPack. That environment isn't in this repository or wombat-os, and this PR doesn't try to recreate it (#149 started on a cross-compiled build).

Found while writing this, not changed here

  • botui crashes at startup when /home/kipr/wombat-os/configFiles/wifiConnectionMode.txt is missing. NetworkManager::eventModeState() and similar functions fall off the end without returning; these are the -Wreturn-type warnings. It doesn't happen on a Wombat, where the file exists; the screenshot script creates it.
  • The botui.deb in wombat-os is v1.2.4 (October 2025), so January's console-flushing fix hasn't shipped.
  • wombat-os's configFiles/botui.service has a stray merge-conflict marker (>>>>>>> harrogate_lts) and no User=, so botui runs as root.
  • libwallaby v1.2.1 doesn't build natively on x86_64 with current binutils: its bundled libav 12.3 fails in libavcodec/x86/mathops.h (operand type mismatch for 'shr'). Its own release build cross-compiles to arm64, so it doesn't hit this.
  • Stale tracked files: debian/ (a Qt 4 armhf package, including a 2020 binary), src/.RootController.cpp.swp, ui/*.ui.autosave, and obj-x86_64-linux-gnu/.

Testing

  • Clean Docker build of this branch on arm64 (Apple Silicon): exit 0 with 13 compiler warnings, no source changes.
  • x86_64: libav with --disable-asm configures, builds, and installs on emulated x86_64 (it failed without the flag). The full x86_64 build is CI on this PR.
  • screenshot.sh: the home, About, Settings, Motors and Sensors, and Programs screens render; a stub program runs and its output appears in the console. It exits 1 when botui crashes at startup and refuses to run outside Docker.
  • actionlint: 0 errors. shellcheck: clean.
  • Not tested on a Wombat. There are no botui source changes, so there's nothing to test on hardware. The devcontainer and a native (non-Docker) build weren't tried.

Adds shared guidance so humans and AI coding agents can work on botui
with a reliable build-and-verify loop, as in Wombat-Firmware:

- AGENTS.md: what botui is, build, verification, architecture, the
  paths and scripts shared with wombat-os and libwallaby, and gotchas.
  CLAUDE.md and GEMINI.md import it so every tool reads the same
  instructions.
- CONTRIBUTING.md: the same guidelines as Wombat-Firmware; only its
  last section is specific to this repository.
- Docker build: Ubuntu 24.04 with Qt 6.4 builds libkar, pcompiler, and
  libwallaby from source at the versions wombat-os ships, then botui.
  It checks that botui compiles; the binary doesn't run on a Wombat,
  whose packages are cross-compiled against a separate Qt 6 build.
  libwallaby's bundled libav is built without assembly, because its x86
  inline assembly doesn't assemble with current binutils.
- scripts/screenshot.sh runs botui on a virtual 800x480 display in the
  image, taps the screen, and saves screenshots, so UI changes can be
  checked without a Wombat.
- CI builds every pull request with the same image and fails if botui
  crashes at startup. It replaces action.yml, which is invalid YAML and
  fails on every push, and bob.yml, which waits 24 hours for a
  self-hosted runner and is cancelled on every push.
- README: current requirements, the Docker build, the new CI badge, and
  a link to CONTRIBUTING.md.
- A devcontainer target, as in Wombat-Firmware.

No botui source changes.
@objorkman
objorkman requested a review from twells46 October 4, 2026 04:37
From review of the first commit:

- The image now provides the stub wombat-os mode file, writable by any
  user, so screenshot.sh also works as the devcontainer's non-root user.
- The devcontainer mounts the repository at /home/dev/botui, the same
  path as docker compose, so the two can share build/.
- screenshot.sh validates X,Y taps, waits for Xvfb to answer instead of
  sleeping, fails when a tap fails, and accepts Podman as well as Docker.
- build.sh works from any directory.
- CI cancels superseded runs.
- Each dependency ref is declared above its own layer, so bumping one
  doesn't rebuild the others.
- AGENTS.md: how to delete root-owned build output on Linux, and the
  startup crash signal on x86_64.
@objorkman
objorkman marked this pull request as ready for review October 4, 2026 04:56
- Fix possible screenshot hanging
- Run build as non-root user
- Fix small mismatches from copied contribution guide
- Take advantage of devcontainer UID mapping
- Screenshot doesn't fail silently
@twells46
twells46 force-pushed the oscar/agent-scaffolding branch from 7e1d846 to a54143b Compare October 12, 2026 18:39
@twells46
twells46 merged commit a7b9e1d into master Oct 12, 2026
1 check passed
@twells46
twells46 deleted the oscar/agent-scaffolding branch October 12, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants