Skip to content
reaatechREAATECH

@reaatech/agent-runbook-incident

npm v0.1.0

Generates severity-based incident response workflows, escalation policies, and communication templates for automated runbooks. It provides a set of utility functions for configuring these procedures and applying dynamic variables to pre-built notification and postmortem templates.

@reaatech/agent-runbook-incident

npm version License: MIT CI

Incident response workflows and communication templates for the Agent Runbook Generator. Generates SEV1–SEV4 incident response procedures with escalation matrices and ready-to-use communication templates.

Installation

terminal
npm install @reaatech/agent-runbook-incident
# or
pnpm add @reaatech/agent-runbook-incident

Feature Overview

  • SEV1–SEV4 workflows — severity-based incident response procedures with response times and triggers
  • Escalation policies — configurable escalation matrices with contact info, channels, and repeat policies
  • Pre-built templates — 20+ communication templates across 5 categories (notification, update, resolution, postmortem, handoff)
  • Template variables — dynamic substitution for service name, severity, incident ID, and timestamps
  • Custom templates — programmatic creation of new communication templates

Quick Start

typescript
import { generateIncidentWorkflows, generateEscalationPolicy, getTemplatesByCategory } from "@reaatech/agent-runbook-incident";
 
const workflows = generateIncidentWorkflows(analysisContext, {
  serviceName: "my-api",
  teamName: "platform-engineering",
  escalationContacts: ["oncall@example.com", "manager@example.com"],
});
 
const policy = generateEscalationPolicy({
  serviceName: "my-api",
  teamName: "platform-engineering",
});
 
const templates = getTemplatesByCategory("incident-notification");

API Reference

Workflow Generator

FunctionSignature
generateIncidentWorkflows(context: AnalysisContext, config: WorkflowConfig) => IncidentWorkflow[]
generateEscalationPolicy(config: WorkflowConfig) => EscalationPolicy
generateStandardWorkflow(context: AnalysisContext, config: WorkflowConfig) => IncidentWorkflow

WorkflowConfig: { serviceName: string; teamName: string; severityLevels?: string[]; escalationContacts?: string[] }

Communication Templates

FunctionSignature
getTemplatesByCategory(categoryId: string) => CommunicationTemplate[]
getTemplateByName(name: string) => CommunicationTemplate | undefined
applyTemplateVariables(template: CommunicationTemplate, variables: Record<string, string>) => CommunicationTemplate
createTemplate(name: string, type: CommunicationTemplate['type'], subject: string, body: string) => CommunicationTemplate

Template categories: incident-notification, status-updates, resolution, postmortem, handoff.

License

MIT