52 lines
2.5 KiB
Markdown
52 lines
2.5 KiB
Markdown
# AGENTS.md - alkane-toolkit
|
|
|
|
Short standing orders for working in this repo. Read `HANDOFF.md` first on any
|
|
resume; it names the live threads. Parent project rules live in
|
|
`../AGENTS.md` (bench discipline, live-fleet-ops).
|
|
|
|
## Build / run (this machine)
|
|
|
|
- Never build or run inside the synced repo tree (noexec, slow FS). Cargo target
|
|
is `~/.cache/alkane-tk-target` (set in `~/.cargo/config.toml`, not committed);
|
|
wx builds go to `~/.cache/wxbuild` / `~/.cache/wx-3.3.3-linux`.
|
|
- `scripts/build-wx-linux.sh` (once) then `scripts/build-gui-linux.sh` (release).
|
|
- CI sets `CARGO_TARGET_DIR=target` and removes target, coverage, bench, and
|
|
release staging after each job, including failed runs. For local builds,
|
|
run `scripts/clean-old-builds.sh` at the end of each task; keep only the
|
|
current release binary and the pinned wxWidgets cache.
|
|
- The GUI is pure-Rust wxWidgets on the vendored, patched `wx-rs`
|
|
(`thirdparty/wx-rs/wx-rs-0.2.0-patched`). When you change it, regenerate the
|
|
matching `thirdparty/wx-rs/patches/NNNN-*.patch` and commit both.
|
|
|
|
## Development / review / visual-feedback loop
|
|
|
|
Every UI change goes through this loop before it is considered done:
|
|
|
|
1. Edit, then `scripts/ui-selftest.sh` -- builds and runs the app headless in
|
|
`ALKANE_SELFTEST` mode: it renders the bench-fleet fixtures through the real
|
|
widgets and compares the table cells + KPIs to the expected hardware output.
|
|
Non-zero exit = a regression. Also run `cargo test -p alkane-gui --offline`
|
|
for the transform-layer unit tests.
|
|
2. `scripts/ui-screenshot.sh out.png` -- captures the running UI to a PNG on a
|
|
private Xvfb display (never the real desktop). Defaults to the offline
|
|
fixtures (`ALKANE_FAKE_SCAN`) so the shot is deterministic; `--live` scans
|
|
the network. Eyeball the PNG for layout regressions.
|
|
3. Only after both pass, wire in real hardware (a live scan) per parent rules.
|
|
|
|
Headless X gotcha: the GTK window only maps under Xvfb with `GDK_BACKEND=x11`
|
|
set; without it the app runs but never shows a window. The scripts set it.
|
|
|
|
## Offline modes (no hardware needed)
|
|
|
|
- `ALKANE_FAKE_SCAN=1` -- feed `crates/alkane-gui/src/fixtures.rs` (the 9 bench
|
|
boards' expected output) instead of scanning. Use for demos and screenshots.
|
|
- `ALKANE_SELFTEST=1` -- run the workflow self-test and exit (see the loop).
|
|
|
|
Keep the fixtures in step with the bench inventory (`HANDOFF.md` section 7).
|
|
|
|
## Conventions
|
|
|
|
- Confidence tags (CONFIRMED/DERIVED/EXTERNAL) on doc claims; cite file paths.
|
|
- Single-line imperative commit summaries.
|
|
- No emojis in any file (parent-project + global rule).
|