@reaatech/agent-runbook-runbook
v0.1.0
Published
Runbook assembly, formatting, and orchestration pipeline for agent-runbook-generator
Readme
@reaatech/agent-runbook-runbook
Runbook assembly, formatting, and orchestration pipeline for the Agent Runbook Generator. Combines all analysis results into a complete operator runbook with table of contents, cross-references, and multiple output formats.
Installation
npm install @reaatech/agent-runbook-runbook
# or
pnpm add @reaatech/agent-runbook-runbookFeature Overview
- Runbook assembly — combines alerts, dashboards, failure modes, rollback procedures, incident workflows, health checks, and service maps into a single structured runbook
- Pipeline orchestration — end-to-end generation pipeline from repository scan through LLM analysis to formatted output
- Table of contents — auto-generated TOC with anchor links for all sections and subsections
- Templating — pre-built runbook section templates with configurable content and ordering
- Multi-format export — Markdown, HTML, and PDF output with consistent formatting
- Validation — completeness, accuracy, and cross-reference validation with CI-grade scoring
Quick Start
import {
buildRunbook,
generateRunbookArtifacts,
exportRunbook,
validateCompleteness,
} from "@reaatech/agent-runbook-runbook";
const { runbook, sections } = await generateRunbookArtifacts({
path: "/path/to/repo",
sections: ["alerts", "dashboards", "failure-modes", "rollback", "incident-response", "health-checks", "service-map"],
});
const markdown = exportRunbook(runbook, "markdown");
const result = validateCompleteness(runbook);
// { score: 0.92, missingSections: [], suggestions: [...] }API Reference
Runbook Builder
| Function | Signature |
|----------|-----------|
| buildRunbook | (analysisContext: AnalysisContext) => Runbook |
| generateTOC | (sections: RunbookSection[]) => TocEntry[] |
| validateCompleteness | (runbook: Runbook) => CompletenessResult |
Formatter
| Function | Signature |
|----------|-----------|
| exportRunbook | (runbook: Runbook, format: ExportFormat) => string |
| formatAsMarkdown | (runbook: Runbook) => string |
| formatAsHTML | (runbook: Runbook) => string |
| formatAsPDF | (runbook: Runbook) => string |
Templates
| Function | Signature |
|----------|-----------|
| getTemplateById | (id: string) => RunbookSectionTemplate \| undefined |
| getAllTemplates | () => RunbookSectionTemplate[] |
| applyTemplate | (template: RunbookSectionTemplate, context: AnalysisContext) => RunbookSection |
Pipeline
| Function | Signature |
|----------|-----------|
| generateRunbookArtifacts | (options: PipelineOptions) => Promise<{ runbook: Runbook; sections: string[] }> |
| parseRunbookDocument | (content: string, format: ExportFormat) => Runbook |
| parseMarkdownRunbook | (content: string) => Runbook |
| validateRunbookAccuracy | (runbook: Runbook, context: AnalysisContext) => AccuracyResult |
| validateRunbookLinks | (runbook: Runbook) => LinkValidationResult |
| createCiValidationResult | (runbook: Runbook, thresholds: ValidationThresholds) => ValidationResult |
Related Packages
- @reaatech/agent-runbook — Core types and utilities
- @reaatech/agent-runbook-analyzer — Repository analysis
- @reaatech/agent-runbook-agent — AI agent for LLM-powered analysis
- @reaatech/agent-runbook-cli — CLI and orchestrator
