How naralanaveen33-hub/dimitri works
Dimitri is an autonomous self-healing platform with two recovery paths: infrastructure recovery and application-code repair. Its central workflow detects an application failure, records an incident, diagnoses it, formulates and validates a patch, then stages and optionally promotes it through a guarded production canary. The graph also preserves monitoring, approvals, persistence, metrics, and incident communication. Some subsystem links are based on README-level capability descriptions; unsampled implementation details are not inferred beyond those documented flows.
Main entry points: incident.py Incident Coordinator · pipeline.py Production Pipeline · monitor.py Health Monitor · patch_engine.py Patch Formulation
Components 28
Detection & Coordination
- Agent Runtime
agent/main.py - Health Monitor
agent/monitor.py - Incident Coordinator
agent/incident.py - Recovery Helper
agent/recovery_helper/main.py
Diagnosis & Repair
- Error Diagnosis
agent/diagnostics/diagnosis.py - Repair Planning
agent/diagnostics/repair_planner.py - Patch Formulation
agent/patching/patch_engine.py - AI Provider
agent/patching/ai_provider.py - Patch Security Checks
agent/patching/patch_validator.py - Isolated Git Workspace
agent/patching/git_manager.py
Validation & Release
- Patch Validation
agent/validation/pipeline.py - Sandbox Runner
agent/validation/sandbox_runner.py - Staging Pipeline
agent/staging/pipeline.py - Staging Deployment
agent/staging/deployment_manager.py - Staging Rollback
agent/staging/rollback_manager.py - Production Pipeline
agent/production/pipeline.py - Canary Validation
agent/production/canary_manager.py - Production Rollback
agent/production/production_rollback_manager.py
Safety & State
- Autonomy Policy
agent/policy/autonomy.py - HMAC Approvals
agent/approvals/approval_manager.py - Incident Ledger
agent/storage.py - Metrics
agent/metrics.py
Operations & Alerts
- Email Notifier
agent/notifications/notifier.py - Message Templates
agent/notifications/template_renderer.py
Other components
- Monitored Application
- Administrator
- Prometheus
- Grafana
Connections 29
- Agent Runtime → Health Monitor: starts
agent/main.py - Agent Runtime → Incident Coordinator: initializes
agent/main.py - Monitored Application → Health Monitor: health probes
README.md - Health Monitor → Incident Coordinator: reports failures
agent/incident.py - Health Monitor → Recovery Helper: dispatches restart
README.md - Incident Coordinator → Error Diagnosis: diagnoses error
agent/incident.py - Error Diagnosis → Repair Planning: plans repair
agent/diagnostics/diagnosis.py - Incident Coordinator → Patch Formulation: requests patch
agent/incident.py - Patch Formulation → AI Provider: generates proposal
agent/patching/patch_engine.py - Patch Formulation → Patch Security Checks: validates patch
agent/patching/patch_engine.py - Patch Formulation → Isolated Git Workspace: applies patch
agent/patching/patch_engine.py - Incident Coordinator → Patch Validation: validates repair
agent/incident.py - Patch Validation → Isolated Git Workspace: creates workspace
agent/validation/pipeline.py - Patch Validation → Sandbox Runner: runs sandbox
agent/validation/pipeline.py - Incident Coordinator → Staging Pipeline: requests staging
agent/incident.py - Staging Pipeline → Staging Deployment: deploys candidate
agent/staging/pipeline.py - Staging Pipeline → Staging Rollback: triggers rollback
agent/staging/pipeline.py - Staging Pipeline → Production Pipeline: promotes candidate
- Production Pipeline → Autonomy Policy: checks level
agent/production/pipeline.py - Production Pipeline → HMAC Approvals: checks authorization
agent/production/pipeline.py - Production Pipeline → Canary Validation: runs canary
agent/production/pipeline.py - Production Pipeline → Production Rollback: rolls back
agent/production/pipeline.py - Incident Coordinator → Incident Ledger: saves incident
agent/incident.py - Incident Coordinator → Email Notifier: sends alerts
agent/incident.py - Email Notifier → Message Templates: renders messages
agent/notifications/notifier.py - Administrator → HMAC Approvals: authorizes action
agent/approvals/approval_manager.py - Health Monitor → Metrics: records metrics
- Prometheus → Metrics: scrapes metrics
README.md - Grafana → Prometheus: visualizes metrics
README.md