# CLAUDE.md
## What this is
Agent-facing CAN bus session frontend. Primary consumer is an LLM agent over MCP; the CLI exists for agents without MCP wiring. Designed for PEAK CAN hardware on Windows; SocketCAN on Linux is supported but less exercised.
## Build and check
Nix provides the toolchain; typical cargo workflow otherwise.
All tests are mock-backed and run headless — no hardware required.
## Key design decisions
- **Raw-first**: all runtime state is raw CAN frames. DBC is a decode/encode overlay only, never stored as the source of truth.
- **Singleton session**: one live session per daemon, enforced. Multi-bus means separate daemon instances.
- **Connect-time DBC**: the alias set is frozen at connect. Changing it requires disconnect + reconnect.
- **Overlapping arb IDs across DBCs are allowed**: alias-qualified selectors disambiguate.
- **MCP and CLI parity**: Tools and shape should be functionally identical.
- **No silent zero-fill on semantic sends**: every signal must be specified. This is intentional safety, not a missing feature.
## Release targets
Linux (x86_64, aarch64 via cross) and Windows (x86_64). No macOS release builds — no CAN driver support.