# AGENTS.md

Operational guide for humans and coding agents working in this repository.
Keep this file short and current. It points at documents; it does not duplicate them.

**Last updated:** 2026-11-30

## What this is

`igis-v2` is a from-scratch second version of a personal operating system. The first
version (2005) began as a Linux driver for a modem; the user/kernel
ring boundary got in the way and it grew into a kernel. No code survives from it; the
continuity is design intent and the constraints learned there.

- **Language:** Rust (`no_std`, freestanding). x86_64 first, with ISA-specific code
  isolated so other architectures can follow (ADR 0013).
- **Thesis:** the kernel is a programmable system — a language runtime plus standard
  library that owns the machine. Applications are source text compiled in the kernel at
  load, never prebuilt binaries (ADR 0019). Everything runs at ring 0 in one address
  space (ADR 0001).
- **Execution:** one interpreter loop per core; tasks are claimed from a global runnable
  set and are never pinned to a core (ADR 0011). The normal-task CPU watchdog covers one
  continuous run and resets when the task blocks (ADR 0061), so a long-lived interactive
  task that waits for input is not killed by a lifetime quota; a task that never blocks
  still faults `BudgetExceeded`.

The long-form narrative, the decision index and the dated status log live in
[`docs/HISTORY.md`](docs/HISTORY.md). Normative behavior is in `specs/`, lasting
decisions in `adr/`, and work items in `PLAN.md`.

## Current state

- Specs 0001–0035 are accepted; **M2–M28 are complete except M28.5 (EHCI, blocked)**
  (desktop, language, filesystems, networking, terminal emulator, runtime display
  modes, PNG/PPM image viewer, kernel-only boot with the application volume on disk,
  the composition model, local client coordinates, the icon grid and the browser
  open-with/menu/clipboard work, audio, user filesystem mounts, task introspection,
  the xHCI one-stick USB path and the 1 TiB boot MMIO identity map). Current
  milestone work is tracked in `PLAN.md`.
  **M16 (composition and surfaces)** is implemented: every window owns a content-sized
  canvas, drawing requires a `window_begin`/`plane_begin` scope (`Status.Invalid` without
  one), the compositor is the only writer of the shadow and recomposes damaged
  rectangles (desktop pattern → windows bottom-to-top → planes → cursor), planes
  (builtins 93–96) carry the shell's menu bar, pull-downs and halt screen above windows,
  `work_area_reserve` (97) keeps frames below the bar strip, and the
  erase/`covers_from`/snapshot/visible-parts machinery and the persistent region claim
  (60/61) are deleted. **M17 (local client coordinates)** makes a window canvas
  window-local (`(0, 0)` is the content top-left): drawing, `get_pixel` inside a scope
  and window-addressed pointer events are local (spec 0026 C4/C6/C8–C10), a plane canvas
  keeps screen coordinates (C11/C12), `window_frame_rect`/`window_content_rect` stay
  absolute screen geometry, and the W12/W28 "re-read the origin on `Expose`" discipline
  is retired. `fill_dither`'s parity is surface-local, so the visual golden was
  re-baselined once (`62e8140a…e809d83c`); `scripts/local_coords_qmp.py` drags a window
  whose owner is mid-frame. **M18 (icon grid)** adds four pre-rasterized 32×32 PPM icons
  under the read-only `icons/` directory and the `/lib` modules `icons` (load/draw) and
  `iconview` (a stateful grid with two-line labels, selection, paging and clamped
  scrolling); the file browser is now a full-width 100×68 icon grid with no text preview,
  maps folders, source apps, plain files and images, loads the icons once at start, and
  launches a file on `Enter`/double-click (spec 0028, ADR 0062). **M19 (browser
  actions)** opens `.ppm`/`.png` in the image viewer, `.txt` in the editor and source
  apps directly; every other regular file gets a six-row context menu (editor, terminal,
  cut, copy, paste, delete). The clipboard is browser-local, writes only under `home/`
  and never overwrites; `Run in terminal` passes `run <path>` to the terminal, which now
  forwards one optional initial command to its shell (spec 0029).
- **M22 (user filesystem mounts)** is complete: spec 0032, ADR 0065. The kernel owns a
  mount namespace (`net/<keyword>/`, at most four), one serialized in-flight operation
  per mount with a FIFO queue of eight, generation-tagged request tokens, a 10 s
  per-operation deadline and `syslib.mount_break_locks` (builtins 104–108, no opcode);
  every filesystem protocol lives in the serving `.ig` application. `lib/netfs.ig` +
  `scripts/netfs_host.py` are the first server (a host directory over TCP, one
  exchange per operation), `apps/utilities/net_mount` is the Mounts window
  (`serve <ip:port> <kw>` is its headless mode), and the editor saves a mount document
  in place (`net/...` is writable like `home/...`; `no_home` stays home-only). Proofs:
  `mount: ok` (synthetic in-guest server, 4/1 cores) and `scripts/netmount_qmp.py`
  (real TCP, host byte comparison, editor save-in-place and Save As).
- **M23/M24 (shared key-value store, lazy expiry)** are complete: spec 0033,
  ADR 0066/0067. One kernel-owned, memory-only store (`kv` crate +
  `kernel/src/cache.rs`, one `SpinLock`) reachable from any task through 27
  `syslib.cache.*` builtins (109–135, no opcode): four kinds (blob,
  set, map, list), at most 1024 entries in a 1 MiB arena reserved in `.bss`, 16 KiB
  values, atomic `incr`, ordered container enumeration and a `gen` change counter. A
  key outlives the task that wrote it and a reboot empties the store; there is no
  persistence, eviction, transaction or quota. A key may carry a time to live
  (`expire`/`ttl`/`garbage_collect`, 133–135): expiry is **lazy** — there is no
  collector task and no timer, an operation that addresses the key removes an expired
  entry first, enumeration skips one without reclaiming it, and the store never reads a
  clock (the host publishes the monotonic uptime before every call). `lib/cache.ig`
  adds the 1024-byte text helpers and `base/keyval` is the terminal interface
  (`list`, `get`, `set`, `del`, `incr`, `expire`, `ttl`, `gc`, `stats` and the
  set/map/list verbs). Proofs:
  `cache: ok` with exact 500-call `incr`/`set.add` totals from two concurrent workers
  plus the expiry phase (X3-vs-X4 included) on 4/1 cores, and
  `scripts/cache_qmp.py` drives `set`/`get`/`stats`/`expire`/`ttl` through the CLI.
- **M26 (paged listings and a separate test root)** is complete: spec 0018/0028,
  ADR 0068. `lib/iconview` holds a 64-entry window (`base`/`total`, `set_total`,
  `put`, `window_*`) instead of a fixed `EntryCapacity`; the file browser, the file
  dialog and the icon-view proof page a directory of any size through
  `core.fs_list`, refill on scroll and never truncate. The test units moved out of
  `base/` to their own `tests/` root (staged only by `image --shell`, searched
  `base/` then `tests/` then the app categories then `system/`), so the shipped
  `base/` is 28 commands in every image and a GUI constant no longer has to cover
  the proof corpus.
- **M27 (task introspection and the Task Manager)** is complete: spec 0034,
  ADR 0069. The scheduler publishes one summary per slot (id, basename, state,
  class, wait kind/target, session, cumulative CPU, run budget, claims/yields and
  the three region lengths), so a task claimed by another core is visible as
  `running` without reading its private value. `syslib.task_count` and
  `syslib.task_info` (builtins 136/137, no opcode) expose fixed snapshots; the
  summary updates at spawn, claim, block, wake, release and reclaim and after
  every quantum. `apps/utilities/task_manager` is an ordinary `.ig` window
  launched from `System > Task Manager`: 18 visible rows, scroll/selection,
  once-a-second sampling in `core.sleep` slices, and an in-window End Task
  confirmation that calls `core.kill`. Proofs: `task_manager: ok`
  (4/1 cores), `task_probe: ok` (spawn two sleeping children, find both, kill
  one and prove the row disappears; 4/1 cores, via
  `scripts/task_probe_qmp.py`), and
  `scripts/task_manager_qmp.py` (System menu → window → dialog open/cancel →
  screenshot; 4/1 cores).
- **M28 (one-stick USB boot and storage)** ships the xHCI path: spec 0035,
  ADR 0070. `cargo xtask usb` emits `build/igis-usb.img`, a BIOS+UEFI hybrid
  ISO with appended 160 MiB `igis-apps` (read-only) and 256 MiB `igis-home`
  (writable) ext2 partitions; the `partition` crate parses MBR/GPT, `ext2w`
  reads the labels, and `vfs/disk.rs` selects the first labelled partition with
  the ATA fallback unchanged. `platform/x86_64/xhci.rs` enumerates USB 2.0/3.x
  root ports and `usb_storage.rs` runs BOT/SCSI over one LUN, so both partitions
  mount at once. **M28.8** extends the boot identity map to the first 1 TiB with
  2 MiB pages (ADR 0071): `pci::find_xhci` accepts a 64-bit BAR below that
  window, logs it, and `xhci::init` marks its 2 MiB page uncached before the
  first register access, so OVMF's `0xc000000000` BAR boots like a low one. The
  frame allocator and every DMA ring stay below 4 GiB. Proofs:
  `usb_storage_qmp.py` (USB-only xHCI boot, 4/1 cores, app SHA unchanged, home
  `e2fsck -fn` clean), `usb_home_qmp.py` (write, power cycle, verify, 4/1 cores)
  and `usb_image_qmp.py --require-desktop` (host layout; SeaBIOS and OVMF/xHCI
  both reach `desktop_shell: ready`; `--expect-high-bar` checks OVMF's
  `0xc000000000`). **EHCI (U18, M28.5) is blocked**, not claimed: the first
  control QH never executes under QEMU `usb-ehci`; the code is preserved opt-in
  with `igis.ehci=1` and the shipped path is xHCI. Known limits: xHCI endpoint
  reset/Set TR Dequeue Pointer after a true stall is deferred; a BAR at or above
  the 1 TiB identity window is a named skip (a dynamic mapper is the follow-up);
  an unpaced multi-byte serial input burst can reorder bytes on more than one
  core; Secure Boot must be off; no USB HID keyboard (PS/2 or laptop internal);
  networking is e1000/e1000e; Settings' Bochs VBE modes are QEMU-only; EHCI
  machines are not supported yet.
- **M20/M21 (audio)** are complete: spec 0030 and 0031, ADR 0063 and 0064.
  `platform/x86_64/hda.rs` brings up one Intel HDA (ICH6/ICH9) playback stream:
  discovery-based DAC and output-pin selection, CORB/RIRB, an 8 × 4 KiB cyclic
  BDL on `SD4`, 48 kHz and 44.1 kHz 16-bit stereo, and `SD_LPIB` whole-period
  accounting from the scheduler. `syslib.sound_open/write/close/volume/mute/
  queued` (builtins 98–103) are owner-checked; a full ring blocks
  `sound_write` and the service wakes it. `lib/wav.ig` streams PCM WAV in
  256-byte pieces; `apps/accessories/music_player` plays/pauses, changes
  volume/mute and draws progress, and the browser opens `.wav` in it. The boot
  self-test (`igis.audio_selftest=44100|48000`) and `scripts/audio_qmp.py`
  (1.027 s captured stereo, 4 and 1 cores) prove both rates. A 44.1 kHz
  public-domain excerpt (Chopin, Nocturne No. 21; 1.7 MB) is staged read-only as
  `audio/`. Known limitation: `mke2fs` writes an all-zero 1 KiB block as an ext2
  hole and `ext2w` rejects zero block pointers (spec 0031); the sample trims
  digital silence, and hole support is a deferred ticket.
- **859 host tests** (635 language — 43 `abi`, 224 `compiler`, 261 `interpreter`, 107
  `langhost` — plus 56 `net`, 28 `ext2w`, 120 `kv` and 20 `partition` tests); ABI v1
  has **75 opcodes** (runtime display modes add builtins 80–83; the machine-level bit
  and bulk buffer primitives are builtins 84–90, `syslib.blit_rgb` is 91, the surface
  model adds 92–97, the audio surface 98–103, the mount seam 104–108, the key-value
  store 109–135 including lazy expiry, and task introspection 136–137, no opcode).
  `stdlib.len` for fixed-size arrays and rings is a compiler-lowered `CONST` (array `N`,
  ring capacity `N`); it adds no opcode, builtin, runtime field or layout change.
- Boot: GRUB/multiboot2 → `system/entrypoint` (the desktop shell), falling back to
  `base/shell`; a graphics-less boot keeps a serial REPL.
- Filesystems: a read-only 160 MiB ext2 application volume (`lib`, `base`, `apps`,
  `home`, `system`, `image`, `icons`, `audio`) on `ide0` unit 1, mounted on demand by the kernel
  through `ext2w`; boot loads only `kernel.elf` and the ISO carries no image. The
  full-resolution PPM P6 corpus at `image/` is generated from the tracked
  `samples/image-src/` sources (the generated `.ppm` files are git-ignored; the PNG
  decoder is retained for PNG files). The four committed 32×32 icon PPMs live under
  `samples/icons/ppm/` and are staged as `icons/` by `scripts/make_icons.py`. A
  persistent 256 MiB ext2 `/home` is the primary master (`ext2w`, `e2fsck -fn` clean).
  The one-stick path adds labelled `igis-apps`/`igis-home` partitions on the xHCI LUN
  ahead of that ATA fallback (spec 0035); the primary master/slave rules are unchanged.
  GUI applications live under `apps/<category>/`. A third branch of the same router is the
  user mount namespace `net/<keyword>/` (spec 0032): the kernel serializes one operation
  per mount and the protocol lives in the serving application, so a filesystem is no
  longer kernel work.
- Networking: virtio-net and e1000/e1000e, IPv4/UDP/TCP, with DHCP/DNS/HTTP/`nc`/`purl`
  in `/lib` and `base/`. `lib/netfs.ig` + `scripts/netfs_host.py` carry a filesystem
  protocol over the same sockets.
- UI: a kernel window server with service-drawn close and minimize boxes, proportional
  font, one kernel System Log window, a terminal emulator
  (`apps/utilities/terminal`) over kernel console sessions, a Settings app
  (`apps/utilities/settings`) that changes the real mode through the Bochs VBE dispi
  (spec 0022, ADR 0056), a Mounts app (`apps/utilities/net_mount`, spec 0032) that
  attaches a host directory at `net/<keyword>/`, a Task Manager
  (`apps/utilities/task_manager`, spec 0034) that lists every live task and can end
  one after confirmation, and source apps (`editor`, `browser`,
  `calculator`,
  `minesweeper`, `clock_window`, `calendar`, `widgets`, `image_viewer`, `music_player`).
  The editor's File >
  Dark row (`Ctrl+D`) switches the whole client content to a dark palette
  (spec 0013); light mode is unchanged. The image viewer
  opens PNG (Adam7 pass-1 stream) and PPM (fixed-stride row seek and 1/8
  sampling), both through `syslib.blit_rgb`, with no full-image buffer and a
  decode progress strip. Every terminal
  instance has its own session, shell and cwd; the `Windows` pull-down lists every
  window (minimized rows marked `min`) and `File` opens a clickable window list. A move or
  a switch is an origin change in the service: the compositor repaints the damaged
  rectangles from the retained canvases, so a moved window cannot leave stale content on
  the windows below and the cursor's restore source is always valid (spec 0026, ADR 0060;
  it replaces ADR 0055). A scrollbar-thumb drag is **deferred**: the editor, browser and
  `/lib` file dialog move only a preview thumb and recomposite the scrollbar strip while
  the button is held, and the application jumps to the dropped position on release, so a
  heavy document is never re-rendered per drag step (spec 0013, spec 0018, M16.8).

## Ground rules

1. **Spec before code.** Behavior changes are described in `specs/` and accepted before
   implementation. If reality and an accepted spec disagree, fix one of them explicitly.
2. **ADRs for decisions, specs for behavior.** A lasting constraint or technology choice
   gets an ADR in `adr/`. See `adr/README.md` for the immutability rule.
3. **Ideas are free.** Capture them in `IDEAS.md`; promote them when they matter.
4. **Don't invent requirements.** Ambiguity is resolved by asking, not by assumption.
   Record the answer in the relevant spec.
5. **Keep this file true.** Update the current-state block, layout and toolchain notes when
   they change. Anything that grows beyond a few lines belongs in a spec, an ADR or
   `docs/HISTORY.md`.
6. **Work is broken into tickets in `PLAN.md`.** One ticket ≈ one session and one commit;
   its acceptance criteria and the deferred backlog live there, not in chat.

### Delegating tickets to subagents

Delegate each ticket to a **fresh subagent session**. Do not continue an old session across
tickets: its context grows with every slice and the model becomes less reliable (observed
after three slices). For every delegation the parent supplies the full context in the new
prompt — spec/ADR, current commit, exact files and symbols, lock order, acceptance
criteria, verification commands and boundaries — and independently verifies the result
(host tests, kernel transcript on `-smp 4` and `-smp 1`, diff, regressions) before
accepting it. A running session may finish the ticket it was given; the next ticket starts
fresh.

## Repository layout

```
.
├── AGENTS.md          # this file: operational facts and conventions
├── README.md          # short project entry point
├── IDEAS.md           # unstructured inbox
├── OPEN-QUESTIONS.md  # parked decisions and unresolved questions
├── PLAN.md            # milestone plan, ticket backlog, deferred items
├── docs/              # long-form history and notes (HISTORY.md)
├── adr/               # decision log (immutable once accepted)
├── specs/             # normative specifications (living)
├── arch/x86_64/       # boot, paging, IDT/GDT, APIC/IOAPIC, PIT, ports, serial, keyboard
├── abi/               # opcodes, headers, Status/FaultCode, shared layout
├── compiler/          # lexer, parser, type/capacity check, codegen, manifest
├── interpreter/       # package verifier, machine, Host trait
├── langhost/          # host runner: compile, verify, run
├── ext2w/             # host-testable read/write ext2 over SectorDevice
├── kv/                # host-testable key-value store: table, arena, four kinds
├── partition/         # host-testable MBR/GPT parser and partition slices
├── net/               # host-testable Ethernet/ARP/IPv4/ICMP/UDP/TCP stack
├── kernel/            # boot/service modules at the crate root (main, repl, stream,
│   ├── mm/            #   event, clock, sync, net) plus the subject groups:
│   ├── platform/x86_64/  # PC devices: ATA, PCI, xHCI/EHCI/USB storage, UHCI/HID, PS/2, AP bring-up
│   ├── sched/         #   interpreter loop and the task table
│   ├── ui/            #   console, sessions, fonts, framebuffer shadow, window server
│   └── vfs/           #   path router over the two ext2w mounts
├── stdlib/            # standard library source, embedded into the compiler
├── samples/apps/      # shipped corpus staged into every image
│   ├── lib/           #   importable modules (`*.ig`, names kept)
│   ├── base/          #   command-line/session apps (`<name>.ig`, staged as `<name>`)
│   ├── apps/          #   GUI apps under accessories/games/productivity/utilities
│   └── system/        #   boot and probe applications (same rule)
├── samples/tests/     # test-only corpus, staged only by `image --shell`
│   └── apps/          #   `tests/` units (`<name>.ig`, staged as `tests/<name>`)
│                      #   and `system/` fixtures (overlaid on `system/`)
├── samples/image-src/ # source JPEGs for the generated PPM corpus
├── samples/image/     # generated PPM P6 corpus (git-ignored, staged as `image/`)
├── samples/icons/     # owner SVG sources + committed 32×32 PPMs (staged as `icons/`)
├── samples/home/      # single seed tree for `home/` and the writable disk
├── samples/lang/      # language examples run by `langhost`
├── scripts/           # QEMU/QMP harnesses (screenshots, proofs, regressions)
├── tests/golden/      # visual-regression golden frame + manifest
├── xtask/             # build, image, USB image and QEMU orchestration
├── Cargo.toml         # workspace
├── rust-toolchain.toml
└── .cargo/config.toml
```

Kernel layout (ADR 0052): `arch/x86_64` is the ISA/boot layer;
`kernel/src/platform/x86_64` holds the PC device drivers (PCI, ATA, xHCI/EHCI, USB
mass storage, UHCI/HID, PS/2) and AP bring-up; `mm`, `sched`, `ui` and `vfs` group the
remaining kernel services, and the boot/service modules stay at the crate root.
Crate-root re-exports keep the historical `crate::gfx`-style paths. The crate is still
one compilation unit; a future `platform` crate can take `platform/x86_64` wholesale.
One ext2 reader serves both mounts: the application volume is a read-only `ext2w` mount
on the primary slave and `/home` the writable one on the primary master, or the two
labelled partitions of the one USB LUN (spec 0035); `ext2w`'s `RefCell` cache is not
`Sync`, so each mount is behind its own `SpinLock` (Q59). The USB controllers are polled
boot-time drivers and never run in an interrupt handler.

## Toolchain

| Item | Version / value |
|------|-----------------|
| stable (default) | rustc 1.99.0 |
| nightly | rustc 1.101.0-nightly (2026-11-02) |
| targets installed | `x86_64-unknown-linux-gnu`, `x86_64-unknown-none` |
| extra components | `rust-src` (nightly), required for `-Z build-std` |
| QEMU | qemu-system-x86_64 10.2.2 |
| boot tooling | GRUB 2.12 BIOS+EFI (`grub2-mkrescue` or `grub-mkrescue`), xorriso, OVMF for the UEFI USB proof |
| image corpus | Python 3 + Pillow (`scripts/make_image_corpus.py`) |
| icon rasterizer | ImageMagick with librsvg (`scripts/make_icons.py`); only for regeneration |

## Build commands

The kernel is cross-built for `x86_64-unknown-none`; `xtask` itself builds for the host.

| Command | Purpose |
|---------|---------|
| `cargo xtask build` | build the kernel ELF (release) |
| `cargo xtask image` | generate the PPM corpus if missing, then build and assemble `build/igis.iso` with GRUB and ensure `build/home.img` |
| `cargo xtask usb [--shell]` | build `build/igis-usb.img` (product) or `build/igis-usb-shell.img` (tests/REPL): BIOS+UEFI hybrid ISO plus the labelled ext2 partitions; prints the `dd` line |
| `python3 scripts/usb_storage_qmp.py [--no-build]` | boot the one-stick image as the only xHCI disk; BOT/SCSI, labelled mounts, app SHA unchanged and home `e2fsck -fn`; 4/1 cores |
| `python3 scripts/usb_home_qmp.py [--no-build]` | shell image: write `/home`, power-cycle QEMU, verify the same stick and fsck the home partition; 4/1 cores |
| `python3 scripts/usb_image_qmp.py build/igis-usb.img [--controller xhci] [--require-desktop] [--expect-high-bar]` | host layout checks plus SeaBIOS/OVMF boot with no IDE; `--require-desktop` asserts the full USB transcript and desktop (writable copy), `--expect-high-bar` requires OVMF's above-4-GiB BAR0 |
| `python3 scripts/partition_qmp.py --build` | labelled/raw ATA partition selection and the `apps: no image` negative |
| `python3 scripts/xhci_qmp.py --no-build` | xHCI enumeration on 4/1 cores plus the empty/no-controller and UHCI tablet cases |
| `cargo xtask run` | image + QEMU with a display and the home disk, serial on stdio; host `127.0.0.1:18080` is forwarded to guest `8080` (`httpserver`); audio defaults to the host PulseAudio/PipeWire (`--audio pa\|pipewire\|alsa\|wav\|none`) |
| `cargo xtask run --headless` | image + QEMU with no display (serial only); same 18080→8080 forward |
| `cargo xtask run --headless --audio wav --audio-selftest [44100\|48000]` | boot with the HDA controller, the WAV backend and the three-ring 440 Hz self-test at the selected rate (`build/audio.wav`); check it with `scripts/audio_wav_check.py` |
| `python3 scripts/audio_qmp.py [--cores N]` | boot the `--shell` image with HDA + WAV, run `apps/accessories/music_player check` and verify the captured 1 s stereo WAV |
| `python3 scripts/netmount_qmp.py [--cores N]` | serve a temporary host tree with `scripts/netfs_host.py`, mount it in the guest, prove reads/writes/rename and the editor's save-in-place over real TCP, and compare the host bytes |
| `cargo xtask clean` | remove build artifacts |
| `scripts/run-release.sh` | boot an assembled release (`igis.iso` + `apps.img`/`apps.img.gz` + `home.img`/`home.img.gz`) in QEMU; shipped as `run.sh` |
| `cargo test -p abi -p compiler -p interpreter -p langhost -p ext2w -p net -p kv -p partition` | host language, filesystem, network-stack, key-value-store and partition-table tests (the kernel crates have no test harness) |
| `cargo run -p langhost -- samples/lang/hello.ig` | compile and run one unit on the host |

`.cargo/config.toml` pins the linker script, `code-model=kernel`, and the static
relocation model for the bare-metal target. The workspace has no default target, so
host tools are unaffected. GitHub is the backup and the code host, not a build farm:
the only workflow (`.github/workflows/tests.yml`) runs the host suite on every push and
pull request and publishes nothing. Bootable artifacts are built locally
(`cargo xtask image`, `cargo xtask usb`) and a "release" is a tag plus those files
uploaded by hand; `scripts/run-release.sh` is shipped as `run.sh` with the IDE files,
and the USB image is written with `dd` (spec 0035).

## Document conventions

- Specs: `specs/NNNN-kebab-title.md`, template `specs/0000-template.md`, index in
  `specs/README.md`. Status must be one of Draft / Accepted / Implemented / Withdrawn /
  Superseded.
- ADRs: `adr/NNNN-kebab-title.md`, template `adr/0000-template.md`, index in
  `adr/README.md`.
- Requirements are numbered and use MUST / SHOULD / MAY (RFC 2119).
- Dates are ISO 8601 (`YYYY-MM-DD`).
- Work in small commits; one logical change per commit. Do not commit unrelated edits.

## Open questions

See [`OPEN-QUESTIONS.md`](OPEN-QUESTIONS.md) for the remaining parked items: tuning
constants, the deferred debug/DMA/streams work, the float follow-ups, virtio-blk, a
journal/atomic replace, the file handle model (Q51) and networking follow-ups
(TLS/HTTPS Q52, IPv6 Q53, Wi-Fi Q54, multiple NICs Q55, TCP backlog Q56, DHCP/DNS
follow-ups Q57, network trust Q58). Boot, platform, scheduler, REPL, language and
filesystem decisions are settled.
When an item is resolved, record the answer in its spec or a new ADR and remove it there.

## History and decisions

The detailed narrative, the decision index and the dated status log are archived in
[`docs/HISTORY.md`](docs/HISTORY.md). Per-decision detail stays in [`adr/`](adr/README.md);
per-requirement behavior stays in [`specs/`](specs/README.md).
