Start the rounds daemon with telemetry polling and diagnosis
Quick-reference skill for starting the rounds continuous error diagnosis daemon with telemetry polling and automated diagnosis.
/rounds-daemon [--config path]
Starts the rounds daemon in daemon mode, which:
This is the primary run mode for production deployment of the rounds system, implementing the full error diagnosis pipeline described in the hexagonal architecture.
Entry Point: rounds/main.py (composition root)
Command:
cd /home/austinsand/workspace/orchestrator/rounds
RUN_MODE=daemon python -m rounds.main
With Custom Configuration:
# Export environment variables from custom config
export $(cat /path/to/custom.env | xargs)
RUN_MODE=daemon python -m rounds.main
Key Components Activated:
rounds/main.py): Wires all adapters and servicesrounds/core/poll_service.py): Orchestrates polling looprounds/adapters/telemetry/): Queries configured backendrounds/core/fingerprint.py): Generates signaturesrounds/core/investigator.py): Orchestrates diagnosisrounds/adapters/store/sqlite.py): Persists signaturesrounds/adapters/diagnosis/claude_code.py): LLM analysisrounds/adapters/notification/): Reports findingsEnvironment Variables (from rounds/config.py):
Core settings:
RUN_MODE=daemon (required)TELEMETRY_BACKEND=signoz|jaeger|grafana_stackSTORE_BACKEND=sqlite (default)DIAGNOSIS_BACKEND=claude_code (default)NOTIFICATION_BACKEND=stdout|markdown|github_issuePolling configuration:
POLL_INTERVAL_SECONDS=60 (default)ERROR_LOOKBACK_MINUTES=5 (default)POLL_BATCH_SIZE=100 (default)Budget controls:
CLAUDE_CODE_BUDGET_USD=5.00 (per-diagnosis limit)DAILY_BUDGET_LIMIT=100.00 (daily spending cap)Backend-specific:
SIGNOZ_API_URL, SIGNOZ_API_KEYJAEGER_API_URLGRAFANA_STACK_URL, GRAFANA_API_KEYSTORE_SQLITE_PATH=./signatures.dbNOTIFICATION_OUTPUT_DIR=./diagnosesGITHUB_TOKEN, GITHUB_REPO# Set up environment
export TELEMETRY_BACKEND=signoz
export SIGNOZ_API_URL=https://signoz.example.com
export SIGNOZ_API_KEY=your-api-key-here
export POLL_INTERVAL_SECONDS=30
export NOTIFICATION_BACKEND=markdown
export NOTIFICATION_OUTPUT_DIR=/var/log/rounds/diagnoses
# Start daemon
cd /home/austinsand/workspace/orchestrator/rounds
RUN_MODE=daemon python -m rounds.main
Expected behavior:
./signatures.db/var/log/rounds/diagnoses/# Set up environment
export TELEMETRY_BACKEND=jaeger
export JAEGER_API_URL=http://localhost:16686
export NOTIFICATION_BACKEND=github_issue
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxx
export GITHUB_REPO=myorg/myapp
export DAILY_BUDGET_LIMIT=50.00
# Start daemon
cd /home/austinsand/workspace/orchestrator/rounds
RUN_MODE=daemon python -m rounds.main
Expected behavior:
myorg/myapp# Minimal config for local development
export TELEMETRY_BACKEND=signoz
export SIGNOZ_API_URL=http://localhost:3301
export NOTIFICATION_BACKEND=stdout
export POLL_INTERVAL_SECONDS=10
export ERROR_LOOKBACK_MINUTES=1
# Start daemon
cd /home/austinsand/workspace/orchestrator/rounds
RUN_MODE=daemon python -m rounds.main
Expected behavior:
# Create .env file
cat > /tmp/rounds.env << EOF
RUN_MODE=daemon
TELEMETRY_BACKEND=grafana_stack
GRAFANA_STACK_URL=https://grafana.example.com
GRAFANA_API_KEY=eyJrIjoiXXXXXX
POLL_INTERVAL_SECONDS=120
STORE_SQLITE_PATH=/var/lib/rounds/signatures.db
NOTIFICATION_BACKEND=markdown
NOTIFICATION_OUTPUT_DIR=/var/log/rounds
DAILY_BUDGET_LIMIT=200.00
EOF
# Load and run
export $(cat /tmp/rounds.env | xargs)
cd /home/austinsand/workspace/orchestrator/rounds
python -m rounds.main
Systemd Service Example:
[Unit]
Description=Rounds Error Diagnosis Daemon
After=network.target
[Service]
Type=simple
User=rounds
WorkingDirectory=/home/austinsand/workspace/orchestrator/rounds
EnvironmentFile=/etc/rounds/daemon.env
ExecStart=/usr/bin/python3 -m rounds.main
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Docker Compose Example: