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

+76
View File
@@ -0,0 +1,76 @@
id = "decision-matrix"
name = "Decision Matrix"
description = "Evaluate competing options against weighted criteria to produce a clear, defensible recommendation."
category = "thinking"
tags = ["decision", "analysis", "strategy", "thinking"]
[i18n.zh]
name = "决策矩阵"
description = "对竞争方案按加权标准进行评估,输出清晰、有据可查的推荐结论。"
[[parameters]]
name = "decision"
description = "The decision to be made and its context"
param_type = "string"
required = true
[[parameters]]
name = "options"
description = "The options or alternatives being considered"
param_type = "string"
required = true
[[steps]]
name = "criteria"
prompt_template = """
You are a decision analyst. For the decision below, define the evaluation criteria:
1. List 5-8 criteria that matter most for this decision
2. For each criterion: define what 'good' looks like (high score) and 'bad' looks like (low score)
3. Assign weights (must sum to 100%) based on business importance
4. Note which criteria are must-haves (disqualifiers if failed)
Decision: {{decision}}
Options: {{options}}
"""
[[steps]]
name = "scoring"
prompt_template = """
Score each option against each criterion on a 1-10 scale. Justify every score with one sentence of evidence or reasoning. Then calculate weighted scores.
Format as a table: Option | Criterion | Raw Score | Weight | Weighted Score.
Add a totals row per option.
Decision: {{decision}}
Options: {{options}}
Criteria and weights:
{{criteria}}
"""
depends_on = ["criteria"]
[[steps]]
name = "recommendation"
prompt_template = """
Synthesise the analysis into a decision memo:
## Recommendation
Clear winner with one-sentence rationale.
## Why Not the Others
For each non-recommended option: the decisive weakness.
## Key Risks of the Recommended Option
Top 3 risks and mitigations.
## Conditions That Would Change This Recommendation
What new information would flip the decision.
## Next Steps
3 immediate actions to execute the decision.
Scoring:
{{scoring}}
"""
depends_on = ["scoring"]