Files
librefang-registry/workflows/research.toml
T
Evan 05bdf02169 feat(workflows): expand template library from 9 to 22 + multiline string cleanup (#36)
* 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
2026-04-01 18:21:09 +08:00

79 lines
2.5 KiB
TOML

id = "research"
name = "Research & Summarise"
description = "Research pipeline that investigates a topic from multiple angles, cross-checks findings for accuracy, and produces a concise executive summary with citations."
category = "research"
tags = ["research", "fact-check", "summarise", "analysis"]
[i18n.zh]
name = "调研与摘要"
description = "调研流水线,从多个角度研究主题,交叉验证结果的准确性,并生成带引用的精炼摘要。"
[[parameters]]
name = "topic"
description = "The research topic or question to investigate"
param_type = "string"
required = true
[[parameters]]
name = "depth"
description = "Research depth: overview, standard, or deep-dive"
param_type = "string"
required = false
default = "standard"
[[parameters]]
name = "audience"
description = "Target audience for the summary (executive, technical, general)"
param_type = "string"
required = false
default = "general"
[[steps]]
name = "research_primary"
prompt_template = """
Conduct {{depth}}-level research on the following topic. Identify key facts, major viewpoints, recent developments, and relevant data points. Organise findings into clear sections with source attribution where possible.
Topic: {{topic}}
"""
[[steps]]
name = "research_counter"
prompt_template = """
Investigate counter-arguments, alternative perspectives, and potential criticisms related to the following topic. Identify areas of genuine controversy or debate, and note any commonly cited claims that are misleading or outdated.
Topic: {{topic}}
"""
[[steps]]
name = "fact_check"
prompt_template = """
Cross-check the following research findings for factual accuracy. For each major claim, assess confidence level (confirmed, likely, uncertain, disputed). Flag any contradictions between the primary research and counter-arguments. Note any claims that require additional verification.
Primary research:
{{research_primary}}
Counter-arguments:
{{research_counter}}
"""
depends_on = ["research_primary", "research_counter"]
[[steps]]
name = "summarise"
prompt_template = """
Produce a concise executive summary suitable for a {{audience}} audience. Incorporate verified findings from the fact-check step. Structure as:
1. Key takeaways (3-5 bullet points)
2. Detailed analysis with confidence levels
3. Areas of uncertainty or debate
4. Recommendations for further investigation
Fact-checked research:
{{fact_check}}
Primary findings:
{{research_primary}}
Alternative perspectives:
{{research_counter}}
"""
depends_on = ["fact_check"]