agent-orchestrator/.claude/rules/14-resilience-and-config.md
DexterFromLab 3672e92b7e feat: Agent Orchestrator — multi-project agent dashboard
Tauri + Svelte 5 + Rust application for orchestrating multiple AI coding agents.
Includes Claude, Aider, Codex, and Ollama provider support, multi-agent
communication (btmsg/bttask), session anchors, plugin sandbox, FTS5 search,
Landlock sandboxing, and 507 vitest + 110 cargo tests.
2026-03-15 15:45:27 +01:00

1.2 KiB

paths
src/**/*.{ts,js,py,go,rs,dart,kt,java}
lib/**/*.{ts,js,py,go,rs,dart,kt,java}
**/*.env*
**/config.*
**/docker-compose*

Resilience and Configuration

External dependencies will fail. Configuration must be externalized.

Resilience

  • Every external call must have a timeout. No indefinite waits.
  • Critical deps: fail visibly, return error. Non-critical: log, serve cached/default, degrade gracefully.
  • Circuit breakers for repeatedly failing deps. Exponential backoff.
  • Retries: bounded, exponential backoff + jitter, idempotent operations only. Non-idempotent mutations require an idempotency key.
  • Make degradation visible: log it, expose in health check.
  • Health checks: verify actual dependency connectivity, not just "process running."

Configuration

  • Externalize all config. Document every knob: purpose, default, valid range, environments.
  • Sensible defaults — runnable with zero config for local dev.
  • Maintain .env.example with all variables and descriptions.
  • Validate required config at startup — fail fast. Log effective config (secrets masked).

Graceful Shutdown

  • Stop accepting new requests, drain in-flight work, release resources (12-Factor IX).