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
This commit is contained in:
Evan authored and GitHub committed 2026-04-01 18:21:09 +08:00
1 parent ae5d97dc7e
commit 05bdf02169
23 files changed
+1500 -64

No files matched your search

+35 -4
View File
@@ -30,18 +30,49 @@ 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.\n\nTopic: {{topic}}"
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.\n\nTopic: {{topic}}"
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.\n\nPrimary research:\n{{research_primary}}\n\nCounter-arguments:\n{{research_counter}}"
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:\n1. Key takeaways (3-5 bullet points)\n2. Detailed analysis with confidence levels\n3. Areas of uncertainty or debate\n4. Recommendations for further investigation\n\nFact-checked research:\n{{fact_check}}\n\nPrimary findings:\n{{research_primary}}\n\nAlternative perspectives:\n{{research_counter}}"
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"]