Login
BadgeSnake Agent Strategy
Login

Mission

Build a reproducible BeagleBadge demonstration where multiple BeagleConnect Zepto boards participate in a Battlesnake-style game controlled by student firmware and rendered locally on the badge.

This repository is the integration point. Prefer keeping upstream technology components in git submodules under this directory and keeping BadgeSnake-specific glue, build scripts, docs, and test assets in this repo.

Current Baseline

Observed on 2026-04-14 from this board:

Treat this as a starting point, not a guarantee. Re-check after any system or bootloader work.

Working Agreements

Multi-Instance Workflow

If more than one Codex instance is working on BadgeSnake, use the repository as the source of truth rather than trying to couple the agents through a live session protocol.

Rules:

Recommended split for current work:

Repository Shape

Target structure:

Submodule Policy

Use git submodules for upstream components that have their own lifecycle and should be updated independently.

Expected submodule classes:

Rules:

Delivery Streams

Work should advance in these streams in parallel where practical:

  1. Demo definition
    • settle game rules, player count, update rate, UX, and success criteria
  2. Hardware interfaces
    • Zepto connection topology, discovery, hot-plug behavior, fault handling
  3. Badge runtime
    • game loop, rendering, audio/status outputs, local logging
  4. Developer workflow
    • submodule layout, build scripts, simulation, packaging
  5. Device reliability
    • update process, bootloader in OSPI, reboot safety, rollback

Reliability Strategy

The board should be able to restart after software changes without depending on a fragile single-path boot setup.

Target end state:

Recommended phases:

  1. Baseline capture
    • document boot order, current storage usage, environment offsets, and recovery access
  2. Environment control
    • configure fw_printenv / fw_setenv against the OSPI env partitions
    • confirm read/write of both primary and backup environment locations
  3. Bootloader deployment
    • install a known-good bootloader into OSPI from the running Linux system
    • verify that the board still boots without depending on microSD-resident loader stages
  4. Rollback design
    • define a good-boot marker and boot-attempt counter
    • keep a fallback boot target that remains untouched until the new system proves healthy
  5. Update automation
    • create scripts/services that stage updates, reboot, validate health, and roll back on failure
  6. Failure drills
    • test bad kernel, bad DTB, bad rootfs, and interrupted deployment scenarios

Never treat OSPI flashing as routine until recovery has been rehearsed and documented.

Helpful Documentation To Add

The most valuable inputs from the user or upstream repos would be:

If only one document gets added next, make it a board recovery guide with exact steps and expected serial-console output.

Definition Of Done

A work item is not done unless: