Agent modes¶
Four modes, each tuned for a phase of firmware development.
Cycle with Tab and Shift+Tab, pick from the agent mode dropdown in the chat input, or type /agents.
| Mode | Best for |
|---|---|
| Ask | Querying datasheets, pinouts, or understanding complex RTOS mechanisms in your codebase |
| Plan | High-level system design: memory mapping, DMA routing, or publish-subscribe architectures, before writing code |
| Debug | Analysing hard faults, stack overflows, or parsing live serial log dumps to find the root cause of a crash |
| Code | Writing HAL implementations, sensor drivers, and bit-banging routines |
Explore, plan, then code¶
For anything spanning more than one file, run all three. Jumping straight to Code on a multi-file change often produces a partial implementation in one file and a stub in the next.
1. Ask, to explore
Read src/drivers/drv8316/{drv8316.cpp,drv8316.h}. How is the SPI bus
owned? How are register reads and writes framed? No code yet.
2. Plan
I want to add a DRV8323 driver following the same pattern. List every
file to create, the public API surface, and the registers to expose
for v1. No code yet.
3. Code, to implement
Implement the plan. Match the DRV8316 init/config/read style exactly.
Build all DRV8316 example sketches after to confirm nothing in shared
code broke.
Skip the plan step for trivial work such as renaming fields or fixing typos. Planning short tasks adds latency without changing the outcome.
Use Ask mode to protect your context¶
Exploration burns context. A prompt like "read all encoder drivers and tell me which implement SimpleFOCRegisters" should run in Ask mode: it returns a summary and leaves your main session clean.
Run it in Code mode and half your context window goes on file reads before a line is written.
Next¶
- Best practices for session discipline.
- Slash commands for
/agentsand session control.