Bias toward caution over speed. For trivial tasks, use judgment.
step → verify plan.git worktree add .worktrees/<branch> -b <branch>; never switch the primary checkout. Symlink deps_all paths from tools/get_deps.py to the primary checkout; replace a symlink and rerun get_deps.py only for a different revision.read-doc to check Calibre first; report missing documents. Search its database, never the library tree.hw/bsp/, docs/reference/boards.rst; classes: src/class/; core/config: src/tusb.h, src/tusb_option.h, each example's src/tusb_config.h; build/deps: tools/build.py, tools/get_deps.py; unit tests: test/unit-test/project.yml.snake_case helpers, UPPER_CASE macros, tud_/tuh_ public APIs, TU_ macros.TU_ASSERT() for error checks; check return values.#if CFG_TUSB_MCU guards. Include order: C stdlib → tusb common → drivers → classes..claude/skills/<name>/scripts/; keep judgment and usage in SKILL.md, without duplicating script logic..claude/test/test_*.py; add tests to untested older scripts when touched.CLAUDE.md and .claude/{agents,skills,workflows} canonical; preserve AGENTS.md -> CLAUDE.md and .agents -> .claude..codex/agents/<role>.toml to load .claude/agents/<role>.md; keep adapters thin and never duplicate role bodies.code-simplifier wraps bundled /simplify in Claude; Codex keeps its standalone equivalent in TOML./codex:review for independent read-only review, /codex:adversarial-review to challenge a design, and /codex:rescue for bounded implementation or diagnosis.peer-agent for read-only consultation with another agent session in this worktree; it is a peer, not a subagent..claude/workflows/. Use code-verify with provider: 'codex' (default), 'claude', or 'all'; validate/full-check use reviewProvider; pr-babysit has an independent model challenge every dismissal before it is posted. Keep workflow nesting to one level..claude/agents/codex-agent.md; .claude/codex-agent.py enforces the allowed roles. Its read-only sandbox has no network: jobs must use local evidence, since failed network reads can produce false empty results. Write-capable roles need worktree isolation first.Build all examples for a board from the repo root; preserve cmake-build-<board> for HIL:
cmake -S examples -B examples/cmake-build-adafruit_metro_rp2350 -DBOARD=adafruit_metro_rp2350 -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel cmake --build examples/cmake-build-adafruit_metro_rp2350 ninja -C examples/cmake-build-adafruit_metro_rp2350 cdc_msc-jlink # Flash with J-Link ninja -C examples/cmake-build-adafruit_metro_rp2350 cdc_msc-openocd # Or OpenOCD
cmake --build examples/cmake-build-adafruit_metro_rp2350 --target cdc_msc.. "$IDF_PATH/export.sh" before build/flash/monitor; run idf.py -DBOARD=<board> build in the ESP-IDF example.-DCMAKE_BUILD_TYPE=Debug -DLOG=2 -DLOGGER=rtt.pre-commit run --all-files (includes unit tests).build-doc.code-size.pre-pr when workflows are available.pr-babysit (.claude/workflows/pr-babysit.js) to drive reviews and CI to green. If workflows are unavailable, use gh pr checks <num> and gh pr view <num> --comments; fix failures, push, and resolve review threads.gh issue create --label followup; link the originating PR and preserve the full handoff in the issue body, including evidence, remaining work, and why deferred. Add revalidation, new findings, and changes to remaining work as issue comments. Close the issue when its implementing PR lands.