How yeeeengyu/incidflow works
IncidentFlow is a LangGraph-based incident-report drafting agent. The principal documented workflow accepts incident logs and context, assembles that input, drafts a report with an LLM, and reviews required sections; failed review loops back to drafting. The README also describes broader investigation, risk analysis, approval, and publishing capabilities, but these are not implemented in the sampled graph. The graph therefore separates the implemented workflow from documented extensions. Source excerpts show the graph wiring and prompt/model calls; unsampled capability links reflect README documentation only.
Main entry points: generate_report.py Generate report · collect_context.py Collect context · builder.py Graph builder · review_report.py Review report
Components 21
Report workflow
- Graph builder
app/graph/builder.py - Collect context
app/graph/node/collect_context.py - Generate report
app/graph/node/generate_report.py - Review report
app/graph/node/review_report.py - Review routing
app/graph/routes.py
Prompt and state
- Incident state
app/graph/state.py - Prompt templates
app/prompt.py - Result schemas
app/type.py
Documented extensions
- Document and history search
app/graph/node - Timeline extraction
app/graph/node - Root cause analysis
app/graph/node - Impact and risk analysis
app/graph/node - Action items
app/graph/node - Evidence verification
app/graph/node - Human approval
app/graph/node - Report publishing
app/graph/node
Runtime service
- OpenAI model
- Health endpoint
app/main.py
Other components
- Incident reporter
- Slack
- Notion
Connections 20
- Incident reporter → Collect context: provides incident details
readme.md - Graph builder → Collect context: starts graph
app/graph/builder.py - Graph builder → Generate report: routes after collection
app/graph/builder.py - Graph builder → Review report: routes after drafting
app/graph/builder.py - Graph builder → Review routing: configures review routing
app/graph/builder.py - Review report → Generate report: revises when rejected
app/graph/builder.py - Collect context → Prompt templates: formats input
app/graph/node/collect_context.py - Generate report → Prompt templates: builds draft prompt
app/graph/node/generate_report.py - Generate report → OpenAI model: invokes
app/graph/node/generate_report.py - Collect context → Incident state: reads incident fields
app/graph/node/collect_context.py - Generate report → Incident state: reads context
app/graph/node/generate_report.py - Review report → Incident state: checks draft
app/graph/node/review_report.py - Review routing → Incident state: checks review result
app/graph/routes.py - Collect context → Result schemas: returns typed result
app/graph/node/collect_context.py - Generate report → Result schemas: returns typed result
app/graph/node/generate_report.py - Review report → Result schemas: returns typed result
app/graph/node/review_report.py - Document and history search → Root cause analysis: informs analysis
readme.md - Root cause analysis → Impact and risk analysis: supports risk assessment
readme.md - Report publishing → Slack: publishes report
readme.md - Report publishing → Notion: publishes report
readme.md