* feat(workflows): add 13 workflow templates across engineering, business, and productivity Engineering: - bug-triage: reproduce path → root cause → fix plan - api-design: resource model → endpoints → OpenAPI spec - incident-postmortem: timeline → RCA → full postmortem report - test-generation: code analysis → edge cases → full test suite - refactor-plan: smell analysis → prioritised opportunities → migration plan Business: - competitor-analysis: profiles → SWOT → strategy report - product-spec: problem definition → user stories → full PRD - market-research: landscape → segments → research report Productivity/Thinking: - meeting-summary: raw notes → structured summary → follow-up email - decision-matrix: criteria → weighted scoring → recommendation memo - learning-plan: gap analysis → roadmap → week-1 day-by-day plan - job-application: job analysis → tailored resume → cover letter → interview prep - blog-post: research → outline → draft → SEO optimisation Closes #1912 on librefang/librefang * fix(workflows): overhaul existing 9 templates - data-pipeline: redesigned — original 'extract from URL' step was broken (LLMs cannot fetch URLs); replaced with paste-data approach (profile → clean_transform → analyse) with analysis_goal parameter - translate-polish: added target_language and register parameters; added back-translation step for accuracy verification - weekly-report: added team/audience parameters, richer extraction step, added Metrics and Notes sections - content-pipeline: added audience/tone parameters, added outline step between research and writing - content-review: fix category 'content' → 'creation' - customer-support: fix category 'support' → 'business' * style(workflows): convert all prompt_template strings to TOML multiline syntax Replace \n escape sequences with real newlines using triple-quote multiline strings ("""...""") across all 22 workflow templates. No content changes — formatting only. * style(hands): replace \n escape in reddit writer format example with multiline code block
85 lines
2.1 KiB
TOML
85 lines
2.1 KiB
TOML
id = "incident-postmortem"
|
|
name = "Incident Postmortem"
|
|
description = "Turn raw incident notes into a structured postmortem: timeline, root cause, impact assessment, and action items."
|
|
category = "engineering"
|
|
tags = ["incident", "postmortem", "devops", "reliability"]
|
|
|
|
[i18n.zh]
|
|
name = "故障复盘"
|
|
description = "将原始故障记录整理为结构化复盘报告:时间线、根因分析、影响评估和行动项。"
|
|
|
|
[[parameters]]
|
|
name = "incident_notes"
|
|
description = "Raw notes, chat logs, or timeline from the incident"
|
|
param_type = "string"
|
|
required = true
|
|
|
|
[[parameters]]
|
|
name = "service_name"
|
|
description = "Name of the affected service or system"
|
|
param_type = "string"
|
|
required = false
|
|
default = ""
|
|
|
|
[[steps]]
|
|
name = "timeline"
|
|
prompt_template = """
|
|
You are an SRE writing a postmortem. From the raw incident notes below, reconstruct a clean chronological timeline:
|
|
- Format: [HH:MM UTC] — event description
|
|
- Include: first alert, detection, escalation, mitigation steps, resolution
|
|
- Note who was involved at each stage
|
|
- Mark the start and end of user impact
|
|
|
|
Service: {{service_name}}
|
|
|
|
Raw notes:
|
|
{{incident_notes}}
|
|
"""
|
|
|
|
[[steps]]
|
|
name = "root_cause_analysis"
|
|
prompt_template = """
|
|
Perform a thorough root cause analysis using the 5-Whys method:
|
|
1. Immediate trigger
|
|
2. Five-whys chain down to the systemic root cause
|
|
3. Contributing factors (monitoring gaps, process failures, dependency issues)
|
|
4. Detection gap — why it took as long as it did to detect
|
|
|
|
Timeline:
|
|
{{timeline}}
|
|
"""
|
|
depends_on = ["timeline"]
|
|
|
|
[[steps]]
|
|
name = "postmortem_report"
|
|
prompt_template = """
|
|
Write a complete postmortem report with these sections:
|
|
|
|
## Summary
|
|
One paragraph: what happened, impact, duration, resolution.
|
|
|
|
## Impact
|
|
Quantified: users affected, error rate, revenue/SLA impact.
|
|
|
|
## Timeline
|
|
(Use the timeline above)
|
|
|
|
## Root Cause
|
|
(Use the RCA above)
|
|
|
|
## What Went Well
|
|
## What Went Wrong
|
|
## Action Items
|
|
Table: | Action | Owner | Priority | Due date |
|
|
Minimum 5 concrete, measurable actions.
|
|
|
|
## Lessons Learned
|
|
|
|
Timeline:
|
|
{{timeline}}
|
|
|
|
Root cause analysis:
|
|
{{root_cause_analysis}}
|
|
"""
|
|
depends_on = ["timeline", "root_cause_analysis"]
|