Getting the Most out of Your Coding Agent¶
This guide is for a human developer directing a coding agent (Claude Code, OpenHands, etc.) on AirStack. The repo does a lot of the prompting for you — this page tells you what to ask for so the built-in machinery actually gets used.
Why this repo is agent-ready¶
Every agent session starts with AGENTS.md in context (CLAUDE.md symlinks to it): architecture, topic conventions, reference implementations, pitfalls. Beyond that, .agents/skills/ holds 20+ step-verified workflow guides that agents discover by task description, and the feature notebook convention gives every feature a design spec and evidence trail that outlive the session. Agents also get a condensed cheat sheet at AI Agent Quick Reference.
1. Start every feature with a notebook design spec¶
Before the agent writes any code, ask it to create the notebook entry:
Follow the use-feature-notebook skill: write
notebook/NNN-my-feature/design_spec.mdfrom our discussion before implementing anything. Show me the spec first.
AGENTS.md already instructs agents to do this at the start of every feature, but an explicit nudge guarantees it — and reviewing the spec before code is written is the cheapest design review you will ever do. A good spec (template in use-feature-notebook) contains:
- Problem context — the motivation, constraints, and decisions from your conversation. This is the one section that preserves context existing nowhere else; check it captures what you actually discussed.
- Proposed implementation — affected packages, nodes, topics, data flow, with per-section status labels (
DESIGN/TODO/WIP/DONE) the agent updates as it works, andDate started/Last updatedin the header — a lab journal entry without a date is unusable later. - Lettered test plan — sections
(a),(b),(c)…, each stating what runs (unit test, system-test mark, sim scenario), what is measured, and what counts as pass. The letters name the results folders later.
Why this pays off: agent sessions end, but the spec survives on disk — the next session (or the next agent, or you in three weeks) picks it up instead of re-deriving intent, and the status labels show exactly which parts are designed, in progress, or finished. Note notebook/ is gitignored and local-only: nothing in it is committed or referenced from committed code; its content reaches the world only distilled into the PR body (full convention).
2. Point the agent at skills, not raw prompts¶
Instead of describing a workflow from scratch, name the skill — "use the add-ros2-package skill" beats a paragraph of instructions, because the skill encodes repo-specific steps (templates, install directives, canonical-default launch args) that a generic prompt misses. Agents match skills to tasks automatically via each skill's trigger description, but naming one removes the guesswork. High-leverage ones for common asks:
| Ask | Skill |
|---|---|
| New algorithm module | add-ros2-package, then integrate-module-into-layer to wire it into a stack |
| New launch topology | create-stack |
| "It doesn't work" | debug-module |
| End-to-end verification | test-in-simulation |
| Docs for the new thing | update-documentation |
The full catalog with one-line triggers is the table in .agents/README.md (mirrored in AGENTS.md). Two other steering moves that cost you one sentence each:
- Name the reference implementation.
AGENTS.mdlists one well-structured package per module type (e.g.droan_local_plannerfor local planners,random_walkfor global planners); "study the DROAN local planner first, then follow its structure" anchors the agent to working code instead of invented patterns. - Say where the work lands. Modules get wired in a stack's entry launch file, not in per-layer bringups (the old layer-bringup workflow is legacy) — telling the agent which stack you're targeting up front avoids a wrong-locus integration.
3. Make the agent test and record¶
Don't accept "it builds" as done. Ask for evidence against the spec's lettered plan:
- Each test run drops raw artifacts (metrics files copied from
tests/results/<timestamp>/, plots, sim screenshots, log excerpts — not full container logs) intonotebook/NNN-slug/results/<letter>-<section>/, letters matching the spec, run timestamps preserved. - After validation, the agent writes
results/results_summary.md— self-contained, tables and figures embedded directly (not linked), one section per letter, ending with per-section verdicts and known limitations. - The PR body is populated from the notebook: problem context from
design_spec.md, validation tables fromresults_summary.md, key figures uploaded as PR attachments — the only route notebook content takes off your machine, since reviewers can't seenotebook/.
A useful review habit: read results_summary.md before the diff. If a lettered section has no artifacts folder, that part of the plan wasn't run.
4. Close the loop: capture what the agent learned¶
When an agent spends real time digging — a long grep-and-read session, a debugging chain that resolved on a non-obvious cause, a discovery contradicting AGENTS.md — tell it to run capture-discovered-knowledge before finishing. The skill decides where the knowledge belongs (fix the wrong claim in AGENTS.md, extend an existing skill, or the package README for module-scoped quirks) and holds a deliberately high bar against bloat: if the code already says it, don't persist it. This is what keeps the next session from paying the same discovery cost. Keep the scopes straight: per-feature evidence stays in the notebook; only durable, repo-wide mechanisms get promoted to AGENTS.md or a skill.
5. Practical tips (all verified in this repo)¶
- Non-interactive
docker exec, always. All development happens inside containers, and agents get stuck on interactive prompts. The pattern isdocker exec airstack-robot-desktop-1 bash -c "<command>"— neverairstack connectordocker exec -itin an agent session (use-airstack-cli). -
bws/swsaliases. Inside robot containers,bwsiscolcon buildwith the repo's flags andswssourcesinstall/setup.bash: -
Bring the stack up agent-friendly.
airstack up robot-desktop --no-autolaunchstarts the container without launching the autonomy stack (so the agent controls what runs), andairstack readyblocks until containers → sim/clock→ nodes → PX4 are actually up (--jsonfor scripts) — better than the agent inventing sleep loops. - Verify with
airstack testmarks.airstack test -m unit -vfor fast hermetic checks,-m "build_docker or build_packages"for build health,-m liveliness/-m sensors/-m takeoff_hover_landfor staged sim verification (tests/README.md). Have the agent copy the resultingtests/results/<timestamp>/metrics.jsoninto the notebook. wiring.mdis generated ground truth. Each stack'swiring.mdis snapshotted from the running graph and drift-checked in CI — never hand-edited. After the agent changes a stack's topology, it must regenerate it (airstack test -m wiring --stack <name> ...) or CI fails (stacks guide).- Logs are
docker logs-visible. Container tmux output is mirrored todocker logs, sodocker logs airstack-robot-desktop-1is the agent's window into bringup — no tmux attach needed.
None of this makes an agent infallible — it still writes plausible-looking wiring that doesn't connect and tests that pass vacuously. The notebook spec, the lettered evidence, and wiring.md drift-checking exist precisely so you can check the agent's work without re-doing it.
Related pages¶
- Feature Notebook — the full notebook convention this guide builds on
- AI Agent Quick Reference — the condensed agent-facing cheat sheet
- Contributing Guide — the human PR process the notebook feeds into