# Deliberation — kido-boot design (2026-10-14, first scaffold session)

Circle: builder crew (Mechane pattern). Question: how should Kido's
boot sequence be structured so it is portable and adaptive from birth?

## Positions
- **P1 (portability-first):** No arch-specific code in the boot state
  machine at all. Per-arch entry shims live outside; this file sees only
  the HAL table. BUBO's flaw was x86 baked into the core; Kido must not
  repeat it even in draft form.
- **P2 (testable-from-day-one):** The boot stages must compile and run
  hosted (-DKIDO_HOSTED_TEST) so the state machine is genuinely
  exercised on the dev machine. BUBO's other flaw: untestable until
  hardware. A boot sequence you cannot run is a boot sequence you
  cannot trust.
- **P3 (loud failures):** Every stage returns a status; any failure
  halts with a diagnostic code. Silent death is how kernels waste weeks.

## Challenges
- **C1 against P2:** A hosted harness risks "testing the harness, not
  the kernel" — the HAL differs, so passing hosted proves little about
  bare metal. Counter: the *stage logic* (order, error propagation,
  adapt-selection rules) is identical; HAL differences are explicit
  STUBs, not hidden. Accepted with the STUB discipline as mitigation.
- **C2 against P1:** Four stages may be over-engineering for a draft;
  a two-stage boot (early -> main) would be smaller. Counter: adaptivity
  at boot is Kido's defining spec requirement ("adaptive from birth").
  A two-stage boot bakes in assumptions — exactly BUBO's flaw.

## Convergence
Four stages (early -> probe -> adapt -> breath), HAL as function-pointer
table, status codes with loud halt, hosted harness proving stage logic,
STUBs marked and never silent. P1+P2+P3 all hold.

## Preserved dissent
- **D1:** A minority held that probe-before-adapt adds a boot-time cost
  a tiny kernel shouldn't pay, and that compile-time driver selection
  with a runtime override would be leaner. Overruled for now: Kido's
  spec prioritizes adaptivity over boot-time minimalism, but if a
  future measured boot shows probe cost dominating, revisit with data.
- **D2:** Whether `kido_main` returning a STUB error (rather than the
  harness treating it as expected) risks confusing future readers.
  Mitigated: the harness documents the expected code explicitly.

## Decision
Write kido-boot.[ch] per the converged design. Revisit D1 only with
measured boot-time data.
