3.0 KiB
3.0 KiB
Agent instructions
Start with project memory
- Read
docs/agent/code-map.mdbefore broad repository exploration. - Read the relevant sections of
docs/agent/architecture.mdanddocs/agent/design-decisions.mdbefore changing cross-cutting behavior. - Read
docs/agent/current-state.mdwhen resuming work or investigating recent changes. - Use these files to identify the smallest relevant source set before searching or reading code.
- Verify stored knowledge against implementation whenever it may be stale or correctness depends on exact behavior. Source code is authoritative.
- Do not repeatedly scan unrelated modules. Prefer targeted symbol searches and representative header/implementation reads.
- Update durable agent documentation only when architecture, contracts, ownership, or module responsibilities genuinely change.
- During long-running tasks, keep
docs/agent/current-state.mdcurrent and update it before handoff or context compaction. - Keep temporary debugging notes and speculative hypotheses out of
architecture.mdanddesign-decisions.md; usecurrent-state.mdinstead. - Treat
GPT-logs/as non-authoritative history. Confirm any useful claim against current source. - Avoid
managed_components/,third_party/, generatedsrc/web_assets_data.*, compressed assets, minified libraries,compile_commands.json,dependencies.lock, and broadsdkconfig.*inspection unless the task specifically requires them.
Project constraints
- This is ESP-IDF firmware for one physical UART1/MAX3243 RS-232 port shared through USB CDC, HTTPS/WebSocket, and SSH.
- Preserve the broker model: exactly one writer, multiple isolated observers.
- Preserve UART0 as the administrative recovery path and native USB as network-independent UART1 access when network services fail.
- Keep serial transport binary-transparent; do not add in-band control sequences.
- Treat bounded queues, buffers, task ownership, generation tokens, and failure isolation as correctness properties, not incidental implementation details.
- Never expose passwords, private keys, Wi-Fi secrets, ticket values, or verifier material through routine status, logs, completion, or the local display.
- Do not regenerate embedded web assets unless the task explicitly requires it. See
web_assets/SOURCES.mdfor provenance and generation policy.
Build and device commands
The normal build, verified from platformio.ini and README.md, is:
pio run
Upload and monitor commands documented by the project are:
pio run --target upload
pio device monitor -b 115200
A first migration to the custom partition table may require pio run --target erase, but erasing destroys persisted configuration and credentials. Never run it without explicit user approval.
No automated host test command is defined in the repository. Hardware validation procedures live in docs/electrical_tests.md and docs/user_administration_tests.md; do not claim they passed unless actually performed.