Bubbaloop is built for agentic engineering — developers AND AI agents working together. This guide defines workflows that serve sensor nodes, contracts, and tests.
"People build increasingly complex toolchains... only to end up building tools instead of genuinely valuable things." — Peter Steinberger
Every workflow must directly improve sensor nodes, contracts, or tests.
If a workflow only improves the workflow itself, delete it. The sensor nodes are the product. Everything else is scaffolding.
- Plan with acceptance criteria + files
- Execute with executor agents (parallel file changes)
- Validate:
pixi run check,cargo test,pixi run clippy - Architect verifies implementation
NEVER skip step 3. Run pixi run check after every Rust change.
- Define component + test strategy
- Write tests FIRST (vitest + jsdom)
- Build UI (React + TypeScript + Tailwind)
- All tests must pass (NO test deletion)
Schema-ready gating: New view components that decode protobuf MUST use useSchemaReady() to gate their useZenohSubscription callback.
- Check argh conventions in CLAUDE.md (
#[derive(FromArgs)],#[argh(subcommand)]) - Write command + unit tests (co-located
#[cfg(test)] mod tests) - Verify 2400+ Rust tests pass
- Zero clippy warnings enforced
Security: Node names [a-zA-Z0-9_-]{1,64}, no null bytes.
- Map proto → Rust → JSON API → TypeScript → templates → UI
- Update proto + rebuild BOTH descriptor pipelines (
bubbaloop-schemasANDbubbaloop) - Update MCP tool handlers in
mcp/mod.rs, add integration tests - Update dashboard types if applicable
- Full system check (2400+ Rust unit tests + 47 MCP integration tests)
Critical: Proto changes require rebuilding both descriptor pipelines.
Start at the lowest tier. Escalate only on failure. Haiku costs ~10x less than Opus.
| Task | Agent Tier | Why |
|---|---|---|
| Find a file/function | explore (Haiku) |
Fast lookup, no reasoning |
| Fix a type error | build-fixer-low (Haiku) |
Single-line fix |
| Implement a feature | executor (Sonnet) |
Standard coding task |
| Write tests | tdd-guide (Sonnet) |
Needs codebase understanding |
| Debug race condition | architect (Opus) |
Deep reasoning required |
| Review architecture | critic (Opus) |
Judgment call, needs experience |
Rule: Don't waste Opus on lookups. Don't waste Haiku on architecture.
| Command | When | Why |
|---|---|---|
pixi run check |
After every Rust change | Fast compilation check |
cargo test --lib -p bubbaloop |
Before commits | 2400+ Rust tests |
cargo test --features test-harness --test integration_mcp |
After MCP changes | 47 integration tests |
pixi run clippy |
Before PRs | Zero warnings (-D warnings) |
Jetson constraint: Do NOT run parallel cargo/pixi commands. ARM64 is too slow. Run sequentially.
See CLAUDE.md for full conventions. Critical rules:
Rust: argh (NOT clap), log (NOT tracing), thiserror/anyhow, zbus (NEVER spawn systemctl), 100% safe (no unsafe)
MCP: All tools use PlatformOperations trait. RBAC tiers (Viewer/Operator/Admin). All handlers audit-logged.
Zenoh API: NEVER .complete(true) on queryables. Python: query.key_expr is property NOT method. ALL nodes MUST use mode: "client".
Security: find_curl() searches /usr/bin,/usr/local/bin,/bin only. Node names [a-zA-Z0-9_-]{1,64}. Bind localhost only.
Commits: feat:, fix:, chore:, docs:, refactor:, test:. Never commit target/, node_modules/, .env. Always commit Cargo.lock, pixi.lock.
-
pixi run checkpasses -
cargo test --lib -p bubbaloop(2400+ tests) -
cargo test --features test-harness --test integration_mcp(47 tests) -
pixi run clippyzero warnings -
CLAUDE.mdupdated if conventions changed - PR summary (1-3 bullets) + test plan
Contract PRs: All surfaces updated (proto → Rust → JSON → TS → templates), backward compat verified.
Update when: New workflows established, agent tiers change, validation checks added.
Keep under 150 lines — AI agents have limited context.
Related files:
CLAUDE.md— Conventions, pitfalls, DO/DON'TARCHITECTURE.md— Design decisions, layer model, securityROADMAP.md— Implementation phases