🎯 Problem Statement
Support agents and engineers need a way to quickly diagnose and resolve common infrastructure issues without manual runbook navigation. When tagged on Slack, InfraGPT should automatically detect problems and provide structured, actionable debugging information through executable skills.
📋 User Story
As a DevOps Engineer/Support Agent
I want to create executable skills (runbooks) that automatically trigger when issues are detected
So that I can get immediate, detailed debugging information and remediation steps when problems occur
Acceptance Criteria:
🔧 Technical Architecture
System Components
-
Skill Definition System
- JSON-based skill schema with metadata, triggers, parameters, and execution steps
- Support for multiple categories: incident-response, monitoring, cost-optimization, security, etc.
- Versioning and lifecycle management
-
Skill Execution Engine
- Pattern matching for automatic skill suggestion
- Parameter extraction from natural language
- Step-by-step execution with error handling and retries
- Real-time progress updates to Slack
-
Integration Layer
- Slack bot integration for triggering and feedback
- LLM-powered skill recommendation and parameter extraction
- External service handlers (GCP, AWS, Datadog, PagerDuty, etc.)
-
Management Interface
- Web-based skill builder with templates
- Organization-scoped skill enablement
- Execution history and analytics
Database Schema
-- Core skill storage
CREATE TABLE skills (
id UUID PRIMARY KEY,
organization_id UUID NOT NULL,
name VARCHAR(64) NOT NULL,
description TEXT NOT NULL,
definition JSONB NOT NULL,
status VARCHAR(20) DEFAULT 'draft',
created_at TIMESTAMP DEFAULT NOW(),
UNIQUE(organization_id, name)
);
-- Skill executions tracking
CREATE TABLE skill_executions (
id UUID PRIMARY KEY,
skill_id UUID NOT NULL,
conversation_id UUID,
triggered_by_user_id UUID,
parameters JSONB,
status VARCHAR(20) DEFAULT 'running',
started_at TIMESTAMP DEFAULT NOW(),
completed_at TIMESTAMP,
result JSONB,
execution_trace JSONB
);
-- Additional tables for enablement, permissions, analytics
Skill Definition Schema
{
"metadata": {
"name": "gcp-disk-cleanup",
"display_name": "GCP Disk Space Cleanup",
"description": "Automated cleanup of disk space on GCP instances",
"category": "infrastructure",
"version": "1.0.0"
},
"triggers": {
"manual": {
"enabled": true,
"keywords": ["disk space", "storage full", "cleanup"]
},
"automatic": {
"alert_patterns": [
{
"source": "monitoring",
"pattern": "disk.*usage.*critical"
}
]
}
},
"parameters": {
"required": [
{
"name": "instance_id",
"type": "string",
"description": "GCP instance identifier"
}
]
},
"execution": {
"steps": [
{
"id": "diagnose",
"type": "diagnostic",
"action": {
"handler": "gcp_command",
"template": "gcloud compute ssh {{instance_id}} --command='df -h'"
}
},
{
"id": "cleanup",
"type": "remediation",
"action": {
"handler": "gcp_command",
"template": "gcloud compute ssh {{instance_id}} --command='sudo apt-get clean && sudo rm -rf /tmp/*'"
}
}
]
}
}
🚀 User Experience Flow
1. Skill Creation
Engineer creates skill via web UI:
1. Choose template (incident-response, monitoring, etc.)
2. Define triggers (keywords, alert patterns)
3. Set parameters (instance IDs, thresholds, etc.)
4. Build execution steps (diagnostic → remediation)
5. Test skill in sandbox environment
6. Publish to organization
2. Skill Execution
Support agent in Slack:
1. Types: "@infragpt our prod-web-01 server is running out of disk space"
2. InfraGPT analyzes message and suggests: "disk-cleanup" skill
3. Extracts parameters: instance_id="prod-web-01"
4. Executes skill steps with real-time updates:
- ✅ Checking disk usage: 87% full
- 🔄 Cleaning temporary files...
- ✅ Cleanup complete: 87% → 62%
5. Posts formatted results with action buttons
3. Skill Management
Org admin dashboard:
1. View all available skills
2. Enable/disable skills per team
3. Monitor execution history and success rates
4. Configure permissions and approval workflows
📊 API Endpoints
# Skill Management
GET /api/v1/orgs/{orgId}/skills
POST /api/v1/orgs/{orgId}/skills
PUT /api/v1/orgs/{orgId}/skills/{skillId}
DELETE /api/v1/orgs/{orgId}/skills/{skillId}
# Skill Execution
POST /api/v1/orgs/{orgId}/skills/{skillId}/execute
GET /api/v1/orgs/{orgId}/executions
GET /api/v1/orgs/{orgId}/executions/{executionId}
# Skill Discovery
GET /api/v1/orgs/{orgId}/skills/search
POST /api/v1/orgs/{orgId}/skills/suggest
🛠️ Implementation Plan
Phase 1: Core Infrastructure (4-6 weeks)
Phase 2: Skill Execution (4-6 weeks)
Phase 3: Slack Integration (3-4 weeks)
Phase 4: Web Interface (4-5 weeks)
Phase 5: Advanced Features (3-4 weeks)
🔐 Security Considerations
📈 Success Metrics
🧪 Testing Strategy
📝 Documentation Requirements
🔄 Migration Strategy
🎯 Related Issues
- Connects to existing conversation service architecture
- Builds upon current LLM module integration
- Extends organization-scoped operations model
- Leverages existing integration framework
💡 Future Enhancements
🤖 Generated with Claude Code
🎯 Problem Statement
Support agents and engineers need a way to quickly diagnose and resolve common infrastructure issues without manual runbook navigation. When tagged on Slack, InfraGPT should automatically detect problems and provide structured, actionable debugging information through executable skills.
📋 User Story
As a DevOps Engineer/Support Agent
I want to create executable skills (runbooks) that automatically trigger when issues are detected
So that I can get immediate, detailed debugging information and remediation steps when problems occur
Acceptance Criteria:
🔧 Technical Architecture
System Components
Skill Definition System
Skill Execution Engine
Integration Layer
Management Interface
Database Schema
Skill Definition Schema
{ "metadata": { "name": "gcp-disk-cleanup", "display_name": "GCP Disk Space Cleanup", "description": "Automated cleanup of disk space on GCP instances", "category": "infrastructure", "version": "1.0.0" }, "triggers": { "manual": { "enabled": true, "keywords": ["disk space", "storage full", "cleanup"] }, "automatic": { "alert_patterns": [ { "source": "monitoring", "pattern": "disk.*usage.*critical" } ] } }, "parameters": { "required": [ { "name": "instance_id", "type": "string", "description": "GCP instance identifier" } ] }, "execution": { "steps": [ { "id": "diagnose", "type": "diagnostic", "action": { "handler": "gcp_command", "template": "gcloud compute ssh {{instance_id}} --command='df -h'" } }, { "id": "cleanup", "type": "remediation", "action": { "handler": "gcp_command", "template": "gcloud compute ssh {{instance_id}} --command='sudo apt-get clean && sudo rm -rf /tmp/*'" } } ] } }🚀 User Experience Flow
1. Skill Creation
2. Skill Execution
3. Skill Management
📊 API Endpoints
🛠️ Implementation Plan
Phase 1: Core Infrastructure (4-6 weeks)
Phase 2: Skill Execution (4-6 weeks)
Phase 3: Slack Integration (3-4 weeks)
Phase 4: Web Interface (4-5 weeks)
Phase 5: Advanced Features (3-4 weeks)
🔐 Security Considerations
📈 Success Metrics
🧪 Testing Strategy
📝 Documentation Requirements
🔄 Migration Strategy
🎯 Related Issues
💡 Future Enhancements
🤖 Generated with Claude Code