feat: add workflow templates (#9)
9 bundled workflow templates: - data-pipeline: ETL extract/transform/validate - content-review: multi-agent draft/quality/accuracy/edit - customer-support: tiered triage/response/escalation - code-review: parallel correctness+security+style analysis - research: research/fact-check/summarize - content-pipeline: research → write → edit article creation - translate-polish: auto-detect language, translate, review - brainstorm: ideation → evaluation → action plan - weekly-report: raw notes → organized → polished report
This commit is contained in:
9 files changed
+297
No files matched your search
@@ -0,0 +1,25 @@
|
||||
id = "brainstorm"
|
||||
name = "Brainstorm & Action Plan"
|
||||
description = "Generate ideas, evaluate them, and create an action plan for the best one"
|
||||
category = "thinking"
|
||||
tags = ["brainstorm", "ideation", "planning"]
|
||||
|
||||
[[parameters]]
|
||||
name = "challenge"
|
||||
description = "The challenge or problem to brainstorm solutions for"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[steps]]
|
||||
name = "idea_generator"
|
||||
prompt_template = "You are a creative strategist. For the following challenge, generate 10 diverse solution ideas. Include: 3 conventional approaches, 4 creative approaches, and 3 bold/unconventional approaches. For each idea, give a one-line title and a 2-sentence explanation.\n\nChallenge: {{challenge}}"
|
||||
|
||||
[[steps]]
|
||||
name = "evaluator"
|
||||
prompt_template = "You are a critical analyst. Evaluate each idea below on three criteria: Feasibility (1-5), Impact (1-5), Originality (1-5). Pick the top 3 ideas and for each provide: why it's promising, key risks, and concrete first steps to implement it.\n\nIdeas:\n{{idea_generator}}"
|
||||
depends_on = ["idea_generator"]
|
||||
|
||||
[[steps]]
|
||||
name = "action_planner"
|
||||
prompt_template = "You are a project planner. Take the top-rated idea below and create a concrete action plan: 1) Clear goal statement 2) 5-step implementation roadmap with timelines 3) Required resources 4) Success metrics 5) Potential obstacles and mitigation strategies.\n\nEvaluation:\n{{evaluator}}"
|
||||
depends_on = ["evaluator"]
|
||||
@@ -0,0 +1,42 @@
|
||||
id = "code-review"
|
||||
name = "Code Review"
|
||||
description = "Parallel code analysis pipeline that evaluates correctness, security, and style independently, then synthesises findings into a unified review summary."
|
||||
category = "engineering"
|
||||
tags = ["code", "review", "security", "quality"]
|
||||
|
||||
[[parameters]]
|
||||
name = "code"
|
||||
description = "The source code or diff to review"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[parameters]]
|
||||
name = "language"
|
||||
description = "Programming language of the code"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = "auto-detect"
|
||||
|
||||
[[parameters]]
|
||||
name = "context"
|
||||
description = "Additional context about the codebase or change purpose"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = ""
|
||||
|
||||
[[steps]]
|
||||
name = "review_correctness"
|
||||
prompt_template = "Review the following {{language}} code for correctness. Analyse:\n- Logic errors and edge cases\n- Error handling completeness\n- Null/undefined safety\n- Off-by-one errors and boundary conditions\n- Resource leaks (memory, file handles, connections)\n- Concurrency issues (race conditions, deadlocks)\n\nContext: {{context}}\n\nCode:\n{{code}}"
|
||||
|
||||
[[steps]]
|
||||
name = "review_security"
|
||||
prompt_template = "Perform a security review of the following {{language}} code. Check for:\n- Injection vulnerabilities (SQL, command, XSS)\n- Authentication and authorisation flaws\n- Sensitive data exposure (logging secrets, hardcoded credentials)\n- Input validation gaps\n- Insecure cryptographic usage\n- Path traversal and SSRF risks\n- Dependency vulnerabilities\n\nContext: {{context}}\n\nCode:\n{{code}}"
|
||||
|
||||
[[steps]]
|
||||
name = "review_style"
|
||||
prompt_template = "Review the following {{language}} code for style and maintainability. Evaluate:\n- Naming conventions and clarity\n- Function/method length and complexity\n- Code duplication\n- Documentation and comments quality\n- Consistent formatting\n- Appropriate use of language idioms\n- API design and public interface clarity\n\nContext: {{context}}\n\nCode:\n{{code}}"
|
||||
|
||||
[[steps]]
|
||||
name = "synthesise"
|
||||
prompt_template = "Synthesise the three independent code review analyses below into a unified review summary. Prioritise findings by severity (critical, high, medium, low). Remove duplicates across analyses. Produce a final verdict: approve, request-changes, or needs-discussion.\n\nCorrectness review:\n{{review_correctness}}\n\nSecurity review:\n{{review_security}}\n\nStyle review:\n{{review_style}}"
|
||||
depends_on = ["review_correctness", "review_security", "review_style"]
|
||||
@@ -0,0 +1,32 @@
|
||||
id = "content-pipeline"
|
||||
name = "Content Creation Pipeline"
|
||||
description = "Research → Write → Edit pipeline for article creation"
|
||||
category = "creation"
|
||||
tags = ["content", "writing", "article"]
|
||||
|
||||
[[parameters]]
|
||||
name = "topic"
|
||||
description = "The topic to research and write about"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[parameters]]
|
||||
name = "word_count"
|
||||
description = "Target word count for the article"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = "800-1200"
|
||||
|
||||
[[steps]]
|
||||
name = "researcher"
|
||||
prompt_template = "You are a research assistant. Research the following topic thoroughly and provide: 1) Background and context 2) Key facts and data points 3) Different perspectives on the topic 4) Recent developments. Be specific and detailed.\n\nTopic: {{topic}}"
|
||||
|
||||
[[steps]]
|
||||
name = "writer"
|
||||
prompt_template = "You are a professional writer. Based on the research below, write a well-structured article ({{word_count}} words). Include: a compelling headline, an engaging introduction, clear sections with subheadings, and a strong conclusion. Write in a clear, accessible style.\n\nResearch:\n{{researcher}}"
|
||||
depends_on = ["researcher"]
|
||||
|
||||
[[steps]]
|
||||
name = "editor"
|
||||
prompt_template = "You are a senior editor. Review and polish the following article. Fix any grammar issues, improve flow, tighten wordy sentences, and ensure factual consistency. Output the final polished version only, no commentary.\n\nDraft:\n{{writer}}"
|
||||
depends_on = ["writer"]
|
||||
@@ -0,0 +1,44 @@
|
||||
id = "content-review"
|
||||
name = "Content Review"
|
||||
description = "Multi-agent content review pipeline that drafts, reviews for quality and accuracy, then produces a final edited version incorporating feedback."
|
||||
category = "content"
|
||||
tags = ["content", "review", "writing", "editing"]
|
||||
|
||||
[[parameters]]
|
||||
name = "topic"
|
||||
description = "The topic or subject to write about"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[parameters]]
|
||||
name = "tone"
|
||||
description = "Desired tone (formal, casual, technical, persuasive)"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = "formal"
|
||||
|
||||
[[parameters]]
|
||||
name = "word_count"
|
||||
description = "Target word count for the content"
|
||||
param_type = "number"
|
||||
required = false
|
||||
default = 500
|
||||
|
||||
[[steps]]
|
||||
name = "draft"
|
||||
prompt_template = "Write a {{tone}} article about {{topic}} with approximately {{word_count}} words. Include a clear introduction, well-structured body, and conclusion. Use concrete examples where appropriate."
|
||||
|
||||
[[steps]]
|
||||
name = "review_quality"
|
||||
prompt_template = "Review the following draft for writing quality. Evaluate clarity, coherence, grammar, tone consistency (target: {{tone}}), and overall readability. Provide specific, actionable feedback with line-level suggestions.\n\nDraft:\n{{draft}}"
|
||||
depends_on = ["draft"]
|
||||
|
||||
[[steps]]
|
||||
name = "review_accuracy"
|
||||
prompt_template = "Review the following draft for factual accuracy and logical consistency. Flag any claims that appear unsupported, statistics that need citation, logical fallacies, or misleading statements. List each issue with a suggested correction.\n\nDraft:\n{{draft}}"
|
||||
depends_on = ["draft"]
|
||||
|
||||
[[steps]]
|
||||
name = "final_edit"
|
||||
prompt_template = "Produce a final edited version of the draft below, incorporating the quality and accuracy feedback. Preserve the original voice and intent while addressing all identified issues.\n\nOriginal draft:\n{{draft}}\n\nQuality feedback:\n{{review_quality}}\n\nAccuracy feedback:\n{{review_accuracy}}"
|
||||
depends_on = ["review_quality", "review_accuracy"]
|
||||
@@ -0,0 +1,39 @@
|
||||
id = "customer-support"
|
||||
name = "Customer Support Triage"
|
||||
description = "Tiered customer support pipeline that classifies incoming requests by urgency and category, drafts an appropriate response, and escalates complex issues to a specialist."
|
||||
category = "support"
|
||||
tags = ["support", "triage", "customer-service", "escalation"]
|
||||
|
||||
[[parameters]]
|
||||
name = "customer_message"
|
||||
description = "The customer's support request or message"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[parameters]]
|
||||
name = "customer_name"
|
||||
description = "Name of the customer for personalisation"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = "Customer"
|
||||
|
||||
[[parameters]]
|
||||
name = "product_context"
|
||||
description = "Product or service context for more accurate responses"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = ""
|
||||
|
||||
[[steps]]
|
||||
name = "classify"
|
||||
prompt_template = "Classify the following customer support request. Determine:\n1. Category: billing, technical, account, feature-request, bug-report, or general\n2. Urgency: low, medium, high, critical\n3. Sentiment: positive, neutral, frustrated, angry\n4. Whether escalation to a human specialist is needed (true/false)\n\nReturn a structured assessment with reasoning for each classification.\n\nProduct context: {{product_context}}\n\nCustomer message:\n{{customer_message}}"
|
||||
|
||||
[[steps]]
|
||||
name = "draft_response"
|
||||
prompt_template = "Draft a helpful, empathetic support response for {{customer_name}} based on the classification below. The response should:\n- Acknowledge the customer's concern\n- Provide a clear solution or next steps\n- Match the appropriate tone for the detected sentiment\n- Include specific action items\n\nClassification:\n{{classify}}\n\nOriginal message:\n{{customer_message}}"
|
||||
depends_on = ["classify"]
|
||||
|
||||
[[steps]]
|
||||
name = "escalation_check"
|
||||
prompt_template = "Review the classification and drafted response below. Determine if this case requires escalation beyond automated support. If escalation is needed, prepare a concise internal handoff note for the specialist team that includes: summary, category, urgency, customer sentiment, attempted resolution, and recommended next steps.\n\nIf no escalation is needed, confirm the drafted response is complete and ready to send.\n\nClassification:\n{{classify}}\n\nDrafted response:\n{{draft_response}}"
|
||||
depends_on = ["classify", "draft_response"]
|
||||
@@ -0,0 +1,32 @@
|
||||
id = "data-pipeline"
|
||||
name = "Data Pipeline"
|
||||
description = "ETL pipeline that extracts data from a source, transforms it into a target format, and validates the output for completeness and correctness."
|
||||
category = "data"
|
||||
tags = ["etl", "data", "pipeline", "transform"]
|
||||
|
||||
[[parameters]]
|
||||
name = "data_source"
|
||||
description = "URL or file path to the data source"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[parameters]]
|
||||
name = "output_format"
|
||||
description = "Desired output format (json, csv, markdown)"
|
||||
param_type = "string"
|
||||
required = false
|
||||
default = "json"
|
||||
|
||||
[[steps]]
|
||||
name = "extract"
|
||||
prompt_template = "Extract raw data from the following source: {{data_source}}. Return the complete dataset without any transformation, preserving the original structure."
|
||||
|
||||
[[steps]]
|
||||
name = "transform"
|
||||
prompt_template = "Transform the following raw data into well-structured {{output_format}} format. Apply standard cleaning: trim whitespace, normalise dates to ISO-8601, remove duplicate rows, and convert empty strings to null.\n\nRaw data:\n{{extract}}"
|
||||
depends_on = ["extract"]
|
||||
|
||||
[[steps]]
|
||||
name = "validate"
|
||||
prompt_template = "Validate the transformed data below for completeness and correctness. Check for: missing required fields, type mismatches, invalid date formats, out-of-range values, and referential integrity. Return a validation report with pass/fail status and any issues found.\n\nTransformed data:\n{{transform}}"
|
||||
depends_on = ["transform"]
|
||||
@@ -0,0 +1,43 @@
|
||||
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"]
|
||||
|
||||
[[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.\n\nTopic: {{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}}"
|
||||
|
||||
[[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}}"
|
||||
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}}"
|
||||
depends_on = ["fact_check"]
|
||||
@@ -0,0 +1,20 @@
|
||||
id = "translate-polish"
|
||||
name = "Translation & Polish"
|
||||
description = "Auto-detect language, translate, and review for naturalness"
|
||||
category = "language"
|
||||
tags = ["translation", "language", "localization"]
|
||||
|
||||
[[parameters]]
|
||||
name = "source_text"
|
||||
description = "The text to translate"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[steps]]
|
||||
name = "translator"
|
||||
prompt_template = "You are an expert translator. Translate the following text. Auto-detect the source language: if it's Chinese, translate to English; if it's English, translate to Chinese; for other languages, translate to both Chinese and English. Preserve the original tone, style, and formatting.\n\nText:\n{{source_text}}"
|
||||
|
||||
[[steps]]
|
||||
name = "reviewer"
|
||||
prompt_template = "You are a bilingual language expert. Review the following translation for accuracy and naturalness. Check for: 1) Mistranslations or meaning shifts 2) Awkward phrasing that sounds translated 3) Cultural context issues. Output the improved final translation only.\n\nTranslation to review:\n{{translator}}"
|
||||
depends_on = ["translator"]
|
||||
@@ -0,0 +1,20 @@
|
||||
id = "weekly-report"
|
||||
name = "Weekly Report Generator"
|
||||
description = "Organize raw work notes into a polished weekly report"
|
||||
category = "business"
|
||||
tags = ["report", "weekly", "productivity"]
|
||||
|
||||
[[parameters]]
|
||||
name = "work_notes"
|
||||
description = "Raw work notes, bullet points, or activity log for the week"
|
||||
param_type = "string"
|
||||
required = true
|
||||
|
||||
[[steps]]
|
||||
name = "organizer"
|
||||
prompt_template = "You are an executive assistant. Organize the following raw work notes into structured categories: 1) Completed tasks 2) In-progress items 3) Blockers/Issues 4) Key decisions made. Extract and list each item clearly, even if the notes are messy.\n\nRaw notes:\n{{work_notes}}"
|
||||
|
||||
[[steps]]
|
||||
name = "report_writer"
|
||||
prompt_template = "You are a professional report writer. Transform the organized items below into a polished weekly report with these sections:\n\n## This Week's Highlights\n(top 3 achievements)\n\n## Progress Details\n(organized by project/area)\n\n## Challenges & Solutions\n(any blockers and how they were addressed)\n\n## Next Week's Priorities\n(based on in-progress items)\n\nKeep it concise and professional.\n\nOrganized items:\n{{organizer}}"
|
||||
depends_on = ["organizer"]
|
||||
Reference in new issue
Block a user