Login
1 branch 0 tags
Ben (T14/NixOS) Minor Makefile cleanup 7080bfb 28 days ago 85 Commits
moon / AGENTS.md

Repository Guidelines

Project Structure & Module Organization

  • src/: core application logic (audio playback, UI, storage, networking).
  • sdl_src/: SDL2 desktop/host build for local testing.
  • esp32/: ESP-IDF firmware target and project scaffolding.
  • assets/ and tools/: font sources and asset tooling.
  • vendor/: third-party code (LVGL, yxml) via submodules; avoid editing unless updating upstream.
  • docs/, datasheets/, sdcard/: reference materials, hardware notes, and sample SD card layout.

Build, Test, and Development Commands

  • make: build the SDL2 desktop binary moon.
  • make run: run the SDL2 build locally.
  • make clean: remove build artifacts (*.o, *.d, moon, generated assets).
  • make format: apply clang-format to C/C++ sources.
  • make fonts: regenerate LVGL font sources from assets/fonts.
  • make esp32: build firmware via ESP-IDF (idf.py build).
  • make esp32-flash: flash to device (defaults to /dev/ttyACM0; adjust as needed).
  • make esp32-monitor: open the ESP-IDF serial monitor.

Coding Style & Naming Conventions

  • Indentation: 4 spaces; column limit 80 (see .clang-format).
  • Language: C11 for C sources; C++11 where used by tooling.
  • Naming: snake_case for files and C functions; keep .c/.h pairs together.
  • Formatting: run make format before commits that touch C/C++ code.

Testing Guidelines

  • No first-party automated test suite in this repo; vendor tests live under vendor/ and are not run by default.
  • Validate changes with the SDL2 build (make run) and on-device testing (make esp32, make esp32-flash, make esp32-monitor) as appropriate.

Commit & Pull Request Guidelines

  • Commit messages are short, sentence-case summaries (e.g., "Added screen transitions"); avoid prefixes unless necessary.
  • PRs should include: a concise change summary, commands run, and device/SDL2 validation notes.
  • For UI changes, include screenshots or short screen captures from SDL2 or device.

Environment & Dependencies

  • Desktop build depends on SDL2, SDL2_mixer, and libcurl via pkg-config.
  • Firmware builds require ESP-IDF; esp32/ follows standard idf.py workflows.
  • Nix/direnv configs exist (flake.nix, .envrc) if you prefer a managed dev shell.