From 370b44083915c7c02ffb12eb44717e70a1699b25 Mon Sep 17 00:00:00 2001 From: Evan Hu Date: Wed, 1 Apr 2026 19:09:09 +0900 Subject: [PATCH 1/4] feat(workflows): add 13 workflow templates across engineering, business, and productivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- workflows/api-design.toml | 36 +++++++++++++++++++++ workflows/blog-post.toml | 48 ++++++++++++++++++++++++++++ workflows/bug-triage.toml | 36 +++++++++++++++++++++ workflows/competitor-analysis.toml | 35 +++++++++++++++++++++ workflows/decision-matrix.toml | 35 +++++++++++++++++++++ workflows/incident-postmortem.toml | 36 +++++++++++++++++++++ workflows/job-application.toml | 40 ++++++++++++++++++++++++ workflows/learning-plan.toml | 50 ++++++++++++++++++++++++++++++ workflows/market-research.toml | 36 +++++++++++++++++++++ workflows/meeting-summary.toml | 36 +++++++++++++++++++++ workflows/product-spec.toml | 36 +++++++++++++++++++++ workflows/refactor-plan.toml | 36 +++++++++++++++++++++ workflows/test-generation.toml | 36 +++++++++++++++++++++ 13 files changed, 496 insertions(+) create mode 100644 workflows/api-design.toml create mode 100644 workflows/blog-post.toml create mode 100644 workflows/bug-triage.toml create mode 100644 workflows/competitor-analysis.toml create mode 100644 workflows/decision-matrix.toml create mode 100644 workflows/incident-postmortem.toml create mode 100644 workflows/job-application.toml create mode 100644 workflows/learning-plan.toml create mode 100644 workflows/market-research.toml create mode 100644 workflows/meeting-summary.toml create mode 100644 workflows/product-spec.toml create mode 100644 workflows/refactor-plan.toml create mode 100644 workflows/test-generation.toml diff --git a/workflows/api-design.toml b/workflows/api-design.toml new file mode 100644 index 0000000..9f1f8d2 --- /dev/null +++ b/workflows/api-design.toml @@ -0,0 +1,36 @@ +id = "api-design" +name = "API Design & Specification" +description = "Design a REST API from requirements: endpoints, request/response schemas, auth, error handling, and OpenAPI spec." +category = "engineering" +tags = ["api", "design", "openapi", "engineering"] + +[i18n.zh] +name = "API 设计与规范" +description = "从需求出发设计 REST API:端点、请求/响应结构、认证、错误处理,输出 OpenAPI 规范。" + +[[parameters]] +name = "requirements" +description = "Feature or product requirements the API needs to satisfy" +param_type = "string" +required = true + +[[parameters]] +name = "tech_stack" +description = "Technology stack and any existing API conventions" +param_type = "string" +required = false +default = "" + +[[steps]] +name = "resource_model" +prompt_template = "You are an API architect. From the requirements below, identify the core resources and their relationships:\n1. List every resource (noun)\n2. Define attributes and types for each\n3. Map relationships (one-to-many, many-to-many)\n4. Identify which resources need CRUD vs. action-oriented endpoints\n\nRequirements:\n{{requirements}}\n\nTech stack / conventions:\n{{tech_stack}}" + +[[steps]] +name = "endpoint_design" +prompt_template = "Design the full set of REST endpoints based on the resource model. For each endpoint specify:\n- Method + path\n- Path/query parameters\n- Request body schema (JSON)\n- Success response schema + status code\n- Error responses (4xx, 5xx)\n- Auth requirement\n- Idempotency and side-effect notes\n\nResource model:\n{{resource_model}}" +depends_on = ["resource_model"] + +[[steps]] +name = "openapi_spec" +prompt_template = "Write a complete OpenAPI 3.1 YAML specification for the API designed above. Include:\n- info block with title, version, description\n- All paths with operations\n- Reusable schemas in components/schemas\n- Security schemes\n- Example request/response bodies\n\nEndpoint design:\n{{endpoint_design}}" +depends_on = ["endpoint_design"] diff --git a/workflows/blog-post.toml b/workflows/blog-post.toml new file mode 100644 index 0000000..7bb0acd --- /dev/null +++ b/workflows/blog-post.toml @@ -0,0 +1,48 @@ +id = "blog-post" +name = "Blog Post Writer" +description = "Research a topic, build a structured outline, write a full-length blog post, then optimise for SEO." +category = "creation" +tags = ["writing", "blog", "seo", "content"] + +[i18n.zh] +name = "博客文章撰写" +description = "调研主题,构建结构化提纲,撰写完整博客文章,并进行 SEO 优化。" + +[[parameters]] +name = "topic" +description = "Blog post topic or working title" +param_type = "string" +required = true + +[[parameters]] +name = "audience" +description = "Target audience and their expertise level" +param_type = "string" +required = false +default = "general audience" + +[[parameters]] +name = "tone" +description = "Desired tone (e.g. technical, conversational, authoritative)" +param_type = "string" +required = false +default = "informative and engaging" + +[[steps]] +name = "research" +prompt_template = "You are a research journalist. For the blog topic below, compile:\n1. Key facts, statistics, and data points (with source type)\n2. Common misconceptions to debunk\n3. Expert perspectives and contrasting views\n4. Recent developments or trends\n5. Concrete examples and case studies\n6. Angles that haven't been covered well in existing content\n\nTopic: {{topic}}\nAudience: {{audience}}" + +[[steps]] +name = "outline" +prompt_template = "You are a content strategist. Create a detailed blog post outline:\n- Compelling headline (3 options)\n- Hook / opening angle\n- H2 sections with H3 subsections\n- Key point per section\n- Data or example to use in each section\n- Conclusion and CTA\n\nTarget length: 1200-1800 words.\nTone: {{tone}}\nAudience: {{audience}}\n\nResearch:\n{{research}}" +depends_on = ["research"] + +[[steps]] +name = "draft" +prompt_template = "Write the full blog post following the outline. Guidelines:\n- Open with a hook that immediately addresses the reader's pain or curiosity\n- Use short paragraphs (3-4 sentences max)\n- Include the statistics and examples from research\n- Use subheadings to aid scannability\n- End with a clear takeaway and one actionable CTA\n- Tone: {{tone}}\n\nOutline:\n{{outline}}\n\nResearch:\n{{research}}" +depends_on = ["outline", "research"] + +[[steps]] +name = "seo_optimise" +prompt_template = "SEO-optimise the blog post:\n1. **Primary keyword** — identify the best target keyword\n2. **Meta title** (under 60 chars) and **meta description** (under 155 chars)\n3. **Keyword placement** — suggest where to naturally insert the primary keyword and 3 secondary keywords\n4. **Internal link opportunities** — topics to link to\n5. **Image alt text suggestions** — 2-3 descriptive alts\n6. **Revised headline** if needed for keyword inclusion\n\nDraft:\n{{draft}}" +depends_on = ["draft"] diff --git a/workflows/bug-triage.toml b/workflows/bug-triage.toml new file mode 100644 index 0000000..8b413cc --- /dev/null +++ b/workflows/bug-triage.toml @@ -0,0 +1,36 @@ +id = "bug-triage" +name = "Bug Triage & Fix Plan" +description = "Analyse a bug report, reproduce the failure path, identify root cause, and produce a prioritised fix plan with test cases." +category = "engineering" +tags = ["bug", "debugging", "triage", "engineering"] + +[i18n.zh] +name = "Bug 分析与修复计划" +description = "分析 Bug 报告,还原失败路径,定位根因,输出优先级排序的修复计划与测试用例。" + +[[parameters]] +name = "bug_report" +description = "The bug report, error message, or stack trace" +param_type = "string" +required = true + +[[parameters]] +name = "codebase_context" +description = "Relevant code snippets or architecture description" +param_type = "string" +required = false +default = "" + +[[steps]] +name = "reproduce_path" +prompt_template = "You are a senior engineer doing bug triage. Given the bug report below, reconstruct the exact failure path:\n1. Preconditions that must be true\n2. Step-by-step sequence that triggers the bug\n3. What the system does vs. what it should do\n4. Affected components and data flow\n\nBug report:\n{{bug_report}}\n\nCodebase context:\n{{codebase_context}}" + +[[steps]] +name = "root_cause" +prompt_template = "You are a debugging expert. Based on the failure path analysis, identify the root cause:\n1. Immediate cause (the direct code/logic fault)\n2. Contributing factors (environment, race condition, assumption violation)\n3. Why this was not caught earlier (missing test, wrong assumption)\n4. Blast radius — what else could be affected\n\nFailure path:\n{{reproduce_path}}" +depends_on = ["reproduce_path"] + +[[steps]] +name = "fix_plan" +prompt_template = "You are a tech lead. Produce a concrete fix plan:\n1. **Recommended fix** — specific code change with rationale\n2. **Alternative approaches** — trade-offs of each\n3. **Test cases to add** — unit, integration, regression\n4. **Rollout recommendation** — hotfix vs. normal release, feature flag needed?\n5. **Prevention** — process or tooling changes to prevent recurrence\n\nRoot cause analysis:\n{{root_cause}}" +depends_on = ["root_cause"] diff --git a/workflows/competitor-analysis.toml b/workflows/competitor-analysis.toml new file mode 100644 index 0000000..f1a935c --- /dev/null +++ b/workflows/competitor-analysis.toml @@ -0,0 +1,35 @@ +id = "competitor-analysis" +name = "Competitor Analysis" +description = "Research competitors, map their strengths and weaknesses, and produce a strategic positioning report." +category = "business" +tags = ["strategy", "market", "competitive", "business"] + +[i18n.zh] +name = "竞品分析" +description = "调研竞争对手,梳理其优劣势,输出战略定位报告。" + +[[parameters]] +name = "product" +description = "Your product or business and its target market" +param_type = "string" +required = true + +[[parameters]] +name = "competitors" +description = "List of competitors to analyse (names or URLs)" +param_type = "string" +required = true + +[[steps]] +name = "competitor_profiles" +prompt_template = "You are a market analyst. For each competitor listed, create a profile:\n- Core product and value proposition\n- Target customer segment\n- Pricing model and tiers\n- Key features and differentiators\n- Known weaknesses or complaints (from reviews, forums)\n- Go-to-market strategy\n- Estimated market share or traction signals\n\nOur product: {{product}}\nCompetitors: {{competitors}}" + +[[steps]] +name = "swot_comparison" +prompt_template = "Perform a comparative SWOT analysis:\n1. For each competitor: their Strengths, Weaknesses, Opportunities they exploit, Threats they face\n2. Our position relative to each on: product depth, pricing, UX, distribution, brand\n3. Whitespace — what pain points do all competitors fail to address?\n\nCompetitor profiles:\n{{competitor_profiles}}" +depends_on = ["competitor_profiles"] + +[[steps]] +name = "strategy_report" +prompt_template = "Write a strategic positioning report:\n\n## Market Landscape\nSummary of the competitive field.\n\n## Our Differentiation\nWhere we win, where we are at parity, where we lag.\n\n## Attack Vectors\n3 specific opportunities to take share from each competitor.\n\n## Defensive Priorities\nWhat strengths to reinforce before competitors close the gap.\n\n## Recommended Positioning Statement\nOne sentence that clearly differentiates us from all listed competitors.\n\n## 90-Day Action Items\nTop 5 concrete actions sorted by impact.\n\nSWOT comparison:\n{{swot_comparison}}" +depends_on = ["swot_comparison"] diff --git a/workflows/decision-matrix.toml b/workflows/decision-matrix.toml new file mode 100644 index 0000000..28eaf14 --- /dev/null +++ b/workflows/decision-matrix.toml @@ -0,0 +1,35 @@ +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:\n1. List 5-8 criteria that matter most for this decision\n2. For each criterion: define what 'good' looks like (high score) and 'bad' looks like (low score)\n3. Assign weights (must sum to 100%) based on business importance\n4. Note which criteria are must-haves (disqualifiers if failed)\n\nDecision: {{decision}}\nOptions: {{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.\n\nFormat as a table: Option | Criterion | Raw Score | Weight | Weighted Score.\n\nAdd a totals row per option.\n\nDecision: {{decision}}\nOptions: {{options}}\n\nCriteria and weights:\n{{criteria}}" +depends_on = ["criteria"] + +[[steps]] +name = "recommendation" +prompt_template = "Synthesise the analysis into a decision memo:\n\n## Recommendation\nClear winner with one-sentence rationale.\n\n## Why Not the Others\nFor each non-recommended option: the decisive weakness.\n\n## Key Risks of the Recommended Option\nTop 3 risks and mitigations.\n\n## Conditions That Would Change This Recommendation\nWhat new information would flip the decision.\n\n## Next Steps\n3 immediate actions to execute the decision.\n\nScoring:\n{{scoring}}" +depends_on = ["scoring"] diff --git a/workflows/incident-postmortem.toml b/workflows/incident-postmortem.toml new file mode 100644 index 0000000..76d0aee --- /dev/null +++ b/workflows/incident-postmortem.toml @@ -0,0 +1,36 @@ +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:\n- Format: [HH:MM UTC] — event description\n- Include: first alert, detection, escalation, mitigation steps, resolution\n- Note who was involved at each stage\n- Mark the start and end of user impact\n\nService: {{service_name}}\n\nRaw notes:\n{{incident_notes}}" + +[[steps]] +name = "root_cause_analysis" +prompt_template = "Perform a thorough root cause analysis using the 5-Whys method:\n1. Immediate trigger\n2. Five-whys chain down to the systemic root cause\n3. Contributing factors (monitoring gaps, process failures, dependency issues)\n4. Detection gap — why it took as long as it did to detect\n\nTimeline:\n{{timeline}}" +depends_on = ["timeline"] + +[[steps]] +name = "postmortem_report" +prompt_template = "Write a complete postmortem report with these sections:\n\n## Summary\nOne paragraph: what happened, impact, duration, resolution.\n\n## Impact\nQuantified: users affected, error rate, revenue/SLA impact.\n\n## Timeline\n(Use the timeline above)\n\n## Root Cause\n(Use the RCA above)\n\n## What Went Well\n## What Went Wrong\n## Action Items\nTable: | Action | Owner | Priority | Due date |\nMinimum 5 concrete, measurable actions.\n\n## Lessons Learned\n\nTimeline:\n{{timeline}}\n\nRoot cause analysis:\n{{root_cause_analysis}}" +depends_on = ["timeline", "root_cause_analysis"] diff --git a/workflows/job-application.toml b/workflows/job-application.toml new file mode 100644 index 0000000..c3f1e7a --- /dev/null +++ b/workflows/job-application.toml @@ -0,0 +1,40 @@ +id = "job-application" +name = "Job Application Package" +description = "Tailor a resume and cover letter to a specific job posting, then prepare targeted interview talking points." +category = "productivity" +tags = ["career", "resume", "job", "interview"] + +[i18n.zh] +name = "求职材料准备" +description = "针对特定职位定制简历和求职信,并准备有针对性的面试谈话要点。" + +[[parameters]] +name = "job_posting" +description = "The full job posting or description" +param_type = "string" +required = true + +[[parameters]] +name = "resume" +description = "Your current resume or experience summary" +param_type = "string" +required = true + +[[steps]] +name = "job_analysis" +prompt_template = "Analyse the job posting as an experienced recruiter:\n1. **Must-have requirements** — skills/experience that are non-negotiable\n2. **Nice-to-have requirements** — preferred but not required\n3. **Company signals** — culture, values, team dynamics from the language used\n4. **Role signals** — what success looks like in 90 days, key challenges\n5. **Keywords** — ATS-critical terms to include in application materials\n6. **Red flags** — anything unusual or concerning in the posting\n\nJob posting:\n{{job_posting}}" + +[[steps]] +name = "resume_tailoring" +prompt_template = "Tailor the resume for this specific role:\n1. **Reorder sections** — put most relevant experience first\n2. **Rewrite bullet points** — for each experience, suggest stronger versions that match job keywords\n3. **Quantify impacts** — flag any bullet points that should have metrics added\n4. **Gaps to address** — experience or skills missing vs. the role requirements\n5. **Summary statement** — write a 3-sentence tailored summary for the top of the resume\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +depends_on = ["job_analysis"] + +[[steps]] +name = "cover_letter" +prompt_template = "Write a compelling cover letter (3-4 paragraphs, under 400 words):\n- Opening: specific hook connecting your background to the company's mission\n- Body: 2 concrete achievements that directly address the job's must-haves\n- Closing: clear ask + why this specific company\n\nAvoid clichés like 'I am writing to apply' or 'I am a hard worker'.\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +depends_on = ["job_analysis"] + +[[steps]] +name = "interview_prep" +prompt_template = "Prepare interview talking points:\n1. **STAR stories** — 3 specific situations from the resume mapped to the job's key requirements\n2. **Questions to ask** — 5 smart questions that show deep interest\n3. **Difficult questions** — likely tough questions for this role with suggested answers\n4. **Salary research** — how to position compensation discussion\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +depends_on = ["job_analysis", "resume_tailoring"] diff --git a/workflows/learning-plan.toml b/workflows/learning-plan.toml new file mode 100644 index 0000000..7eb177d --- /dev/null +++ b/workflows/learning-plan.toml @@ -0,0 +1,50 @@ +id = "learning-plan" +name = "Personalised Learning Plan" +description = "Assess current knowledge, identify gaps, and build a structured learning roadmap with resources and milestones." +category = "productivity" +tags = ["learning", "education", "planning", "productivity"] + +[i18n.zh] +name = "个性化学习计划" +description = "评估当前知识水平,识别差距,构建带资源和里程碑的结构化学习路线图。" + +[[parameters]] +name = "skill" +description = "The skill or subject to learn" +param_type = "string" +required = true + +[[parameters]] +name = "current_level" +description = "Your current knowledge and experience with this topic" +param_type = "string" +required = false +default = "complete beginner" + +[[parameters]] +name = "goal" +description = "What you want to be able to do once you've learned it" +param_type = "string" +required = false +default = "professional proficiency" + +[[parameters]] +name = "time_available" +description = "Hours per week available for learning" +param_type = "string" +required = false +default = "5 hours per week" + +[[steps]] +name = "gap_analysis" +prompt_template = "You are an expert educator in {{skill}}. Analyse the learner's situation:\n1. **Knowledge map** — the full topic broken into sub-skills and concepts\n2. **Current position** — what they likely know given their stated level\n3. **Target position** — what they need to know to reach their goal\n4. **Critical gaps** — the 5 most important things to learn first\n5. **Common pitfalls** — mistakes beginners make, concepts people find hardest\n\nSkill: {{skill}}\nCurrent level: {{current_level}}\nGoal: {{goal}}" + +[[steps]] +name = "roadmap" +prompt_template = "Design a learning roadmap divided into phases. For each phase:\n- Name and duration estimate\n- Learning objectives (what they'll be able to do)\n- Core concepts to master\n- 3-5 specific resources (books, courses, docs, tutorials — real names where possible)\n- Practice project or exercise\n- How to know the phase is complete (milestone)\n\nTime available: {{time_available}}\n\nGap analysis:\n{{gap_analysis}}" +depends_on = ["gap_analysis"] + +[[steps]] +name = "week1_plan" +prompt_template = "Create a concrete day-by-day plan for the first week of learning. For each day:\n- Specific topic to cover\n- Exact resource to use (chapter, video, section)\n- Time estimate\n- Exercise or thing to build/practice\n- End-of-day check: how to verify understanding\n\nAssume {{time_available}} is available.\n\nRoadmap:\n{{roadmap}}" +depends_on = ["roadmap"] diff --git a/workflows/market-research.toml b/workflows/market-research.toml new file mode 100644 index 0000000..f85a34b --- /dev/null +++ b/workflows/market-research.toml @@ -0,0 +1,36 @@ +id = "market-research" +name = "Market Research Report" +description = "Analyse a market opportunity: size, trends, customer segments, key players, and go-to-market entry points." +category = "business" +tags = ["market", "research", "strategy", "business"] + +[i18n.zh] +name = "市场调研报告" +description = "分析市场机会:市场规模、趋势、客户细分、主要参与者和进入市场的切入点。" + +[[parameters]] +name = "market" +description = "The market or industry to research" +param_type = "string" +required = true + +[[parameters]] +name = "business_context" +description = "Your company, product, or investment thesis context" +param_type = "string" +required = false +default = "" + +[[steps]] +name = "market_landscape" +prompt_template = "You are a market research analyst. Map the current landscape for: {{market}}\n\n1. **Market definition** — precise scope and adjacent markets\n2. **Market size** — TAM, SAM, SOM estimates with methodology\n3. **Growth rate** — historical and projected CAGR\n4. **Maturity stage** — emerging / growth / mature / declining\n5. **Key trends** — top 5 forces shaping the market (technology, regulation, behaviour)\n6. **Geographic distribution** — where activity is concentrated\n\nContext: {{business_context}}" + +[[steps]] +name = "customer_segments" +prompt_template = "Identify and profile the customer segments in this market:\n\nFor each segment (aim for 3-5):\n- Name and size\n- Demographics/firmographics\n- Key pain points and jobs-to-be-done\n- Current solutions they use\n- Willingness to pay signals\n- Acquisition channels\n- Which segment is most underserved\n\nMarket landscape:\n{{market_landscape}}" +depends_on = ["market_landscape"] + +[[steps]] +name = "research_report" +prompt_template = "Write a structured market research report:\n\n## Executive Summary\n3 bullet points: opportunity, risk, recommended entry point.\n\n## Market Overview\n## Customer Segments\n## Competitive Landscape\nTop players by segment, their moats and vulnerabilities.\n\n## Market Entry Analysis\n- Best beachhead segment\n- Entry barriers and how to overcome them\n- Differentiation opportunities\n- Estimated time to meaningful traction\n\n## Key Risks\n## Recommended Next Steps\n\nMarket landscape:\n{{market_landscape}}\n\nCustomer segments:\n{{customer_segments}}" +depends_on = ["market_landscape", "customer_segments"] diff --git a/workflows/meeting-summary.toml b/workflows/meeting-summary.toml new file mode 100644 index 0000000..8c48062 --- /dev/null +++ b/workflows/meeting-summary.toml @@ -0,0 +1,36 @@ +id = "meeting-summary" +name = "Meeting Summary & Action Items" +description = "Transform raw meeting notes or transcript into a structured summary, decisions log, and follow-up email." +category = "productivity" +tags = ["meeting", "notes", "productivity", "collaboration"] + +[i18n.zh] +name = "会议纪要与行动项" +description = "将原始会议记录或转录文本整理为结构化摘要、决策日志和跟进邮件。" + +[[parameters]] +name = "notes" +description = "Raw meeting notes or transcript" +param_type = "string" +required = true + +[[parameters]] +name = "meeting_context" +description = "Meeting type, attendees, and goal (optional)" +param_type = "string" +required = false +default = "" + +[[steps]] +name = "structured_summary" +prompt_template = "You are an executive assistant. From the raw meeting notes below, extract:\n\n**Key Discussion Points** — 3-7 bullet points on what was discussed\n**Decisions Made** — each decision with rationale and who decided\n**Open Questions** — unresolved items that need follow-up\n**Blockers & Risks** — anything flagged as blocking progress\n\nContext: {{meeting_context}}\n\nNotes:\n{{notes}}" + +[[steps]] +name = "action_items" +prompt_template = "Extract all action items from the meeting. For each:\n- Action: specific, measurable task\n- Owner: person responsible (use name from notes)\n- Due date: explicit date or relative (e.g. 'by next Friday')\n- Priority: High / Medium / Low\n- Dependencies: what must happen first\n\nFormat as a table.\n\nSummary:\n{{structured_summary}}\n\nNotes:\n{{notes}}" +depends_on = ["structured_summary"] + +[[steps]] +name = "followup_email" +prompt_template = "Write a professional follow-up email to send to all attendees. Include:\n- Subject line\n- Brief recap (2-3 sentences)\n- Decisions section\n- Action items table (owner, task, due date)\n- Next steps / next meeting placeholder\n\nKeep tone professional but concise. Use the attendees' first names.\n\nSummary:\n{{structured_summary}}\n\nAction items:\n{{action_items}}" +depends_on = ["structured_summary", "action_items"] diff --git a/workflows/product-spec.toml b/workflows/product-spec.toml new file mode 100644 index 0000000..c7c9373 --- /dev/null +++ b/workflows/product-spec.toml @@ -0,0 +1,36 @@ +id = "product-spec" +name = "Product Spec Writer" +description = "Turn a product idea or feature request into a complete PRD: user stories, acceptance criteria, technical notes, and open questions." +category = "business" +tags = ["product", "prd", "planning", "engineering"] + +[i18n.zh] +name = "产品需求文档撰写" +description = "将产品想法或功能需求转化为完整 PRD:用户故事、验收标准、技术备注和待确认事项。" + +[[parameters]] +name = "feature_idea" +description = "Feature idea or problem statement to spec out" +param_type = "string" +required = true + +[[parameters]] +name = "context" +description = "Product context, target users, and any constraints" +param_type = "string" +required = false +default = "" + +[[steps]] +name = "problem_definition" +prompt_template = "You are a senior product manager. Define the problem clearly:\n1. **Problem statement** — one precise sentence\n2. **Who has this problem** — user segments and their specific pain\n3. **Current workarounds** — how users cope today\n4. **Why now** — why is this worth solving now\n5. **Success looks like** — quantifiable outcomes\n6. **Out of scope** — what this will deliberately not solve\n\nIdea: {{feature_idea}}\nContext: {{context}}" + +[[steps]] +name = "user_stories" +prompt_template = "Write user stories in the format: As a [user type], I want to [action] so that [outcome].\n\nFor each story:\n- Given / When / Then acceptance criteria (3-5 criteria)\n- Priority: P0 (must-have) / P1 (should-have) / P2 (nice-to-have)\n- Estimated complexity: S / M / L / XL\n\nWrite at least 6 user stories covering happy paths, edge cases, and error states.\n\nProblem definition:\n{{problem_definition}}" +depends_on = ["problem_definition"] + +[[steps]] +name = "prd" +prompt_template = "Write a complete Product Requirements Document:\n\n## Overview\n## Problem Statement\n## Goals & Non-Goals\n## User Stories\n(from above)\n## Functional Requirements\nNumbered list of specific behaviours the system must exhibit.\n## Non-Functional Requirements\nPerformance, security, accessibility, internationalisation.\n## Technical Considerations\nKnown constraints, integration points, migration needs.\n## Metrics\nHow success will be measured (leading and lagging indicators).\n## Open Questions\nDecisions still needed, with suggested owners.\n## Timeline Sketch\nPhases with rough scope.\n\nProblem definition:\n{{problem_definition}}\n\nUser stories:\n{{user_stories}}" +depends_on = ["problem_definition", "user_stories"] diff --git a/workflows/refactor-plan.toml b/workflows/refactor-plan.toml new file mode 100644 index 0000000..de9e815 --- /dev/null +++ b/workflows/refactor-plan.toml @@ -0,0 +1,36 @@ +id = "refactor-plan" +name = "Refactor Plan" +description = "Analyse code for quality issues, prioritise refactoring opportunities, and produce a safe incremental migration plan." +category = "engineering" +tags = ["refactoring", "code-quality", "engineering", "architecture"] + +[i18n.zh] +name = "重构计划" +description = "分析代码质量问题,优先排序重构机会,制定安全的增量迁移计划。" + +[[parameters]] +name = "code" +description = "Code to refactor" +param_type = "string" +required = true + +[[parameters]] +name = "context" +description = "Why refactoring is being considered (performance, maintainability, tech debt)" +param_type = "string" +required = false +default = "general code quality improvement" + +[[steps]] +name = "smell_analysis" +prompt_template = "You are a senior software architect performing a code quality audit. Identify all code smells and issues:\n\nFor each issue found:\n- Category: naming / duplication / complexity / coupling / abstraction / performance / security\n- Severity: critical / high / medium / low\n- Location: function/class name\n- Description: what is wrong\n- Impact: why it matters\n\nContext: {{context}}\n\nCode:\n{{code}}" + +[[steps]] +name = "prioritised_opportunities" +prompt_template = "Prioritise refactoring opportunities by: (impact × risk_reduction) / effort.\n\nFor the top 5 opportunities:\n- What to change\n- Expected benefit\n- Estimated effort: hours\n- Risk level: low / medium / high\n- Prerequisites: what must be done first\n- Whether tests are needed before refactoring\n\nSmell analysis:\n{{smell_analysis}}" +depends_on = ["smell_analysis"] + +[[steps]] +name = "migration_plan" +prompt_template = "Design an incremental refactoring plan that keeps the system working throughout:\n\n**Phase 1 — Safety net** (tests and coverage)\n**Phase 2 — Low-risk quick wins**\n**Phase 3 — Structural changes**\n**Phase 4 — Validation and cleanup**\n\nFor each phase:\n- Specific changes in order\n- How to verify nothing broke after each change\n- Rollback strategy\n- Definition of done\n\nAlso note: what NOT to change in this refactoring cycle.\n\nPrioritised opportunities:\n{{prioritised_opportunities}}" +depends_on = ["prioritised_opportunities"] diff --git a/workflows/test-generation.toml b/workflows/test-generation.toml new file mode 100644 index 0000000..e918064 --- /dev/null +++ b/workflows/test-generation.toml @@ -0,0 +1,36 @@ +id = "test-generation" +name = "Test Suite Generation" +description = "Analyse code to generate comprehensive unit tests, integration tests, and edge case coverage." +category = "engineering" +tags = ["testing", "quality", "engineering", "tdd"] + +[i18n.zh] +name = "测试用例生成" +description = "分析代码,生成完整的单元测试、集成测试和边界情况覆盖。" + +[[parameters]] +name = "code" +description = "Source code to generate tests for" +param_type = "string" +required = true + +[[parameters]] +name = "language" +description = "Programming language and test framework to use" +param_type = "string" +required = false +default = "auto-detect" + +[[steps]] +name = "code_analysis" +prompt_template = "Analyse the following {{language}} code as a QA engineer:\n1. List every public function/method and its contract (inputs → outputs)\n2. Identify all branches and conditional paths\n3. Note external dependencies that need mocking\n4. Flag complex logic most likely to contain bugs\n5. List data types and their valid/invalid ranges\n\nCode:\n{{code}}" + +[[steps]] +name = "edge_cases" +prompt_template = "Based on the code analysis, enumerate all edge cases and boundary conditions:\n- Null/empty/zero inputs\n- Maximum/minimum values\n- Concurrent access scenarios\n- Error propagation paths\n- State machine transitions\n- External dependency failures\n\nCode analysis:\n{{code_analysis}}" +depends_on = ["code_analysis"] + +[[steps]] +name = "test_suite" +prompt_template = "Write a complete test suite in {{language}} covering:\n1. **Happy path tests** — one per public function\n2. **Edge case tests** — from the edge case list\n3. **Error handling tests** — each error path\n4. **Integration tests** — cross-component interactions\n\nUse descriptive test names following the pattern: `test___`.\nInclude setup/teardown where needed. Add a comment explaining the intent of non-obvious tests.\n\nCode:\n{{code}}\n\nEdge cases:\n{{edge_cases}}" +depends_on = ["code_analysis", "edge_cases"] From 1e77629fa9784e536fd5a300ca61046a7bfb019f Mon Sep 17 00:00:00 2001 From: Evan Hu Date: Wed, 1 Apr 2026 19:12:45 +0900 Subject: [PATCH 2/4] fix(workflows): overhaul existing 9 templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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' --- workflows/content-pipeline.toml | 33 ++++++++++++++++++++------ workflows/content-review.toml | 2 +- workflows/customer-support.toml | 2 +- workflows/data-pipeline.toml | 41 +++++++++++++++++++-------------- workflows/translate-polish.toml | 35 +++++++++++++++++++++------- workflows/weekly-report.toml | 30 +++++++++++++++++------- 6 files changed, 101 insertions(+), 42 deletions(-) diff --git a/workflows/content-pipeline.toml b/workflows/content-pipeline.toml index e1d4d4d..2307451 100644 --- a/workflows/content-pipeline.toml +++ b/workflows/content-pipeline.toml @@ -1,12 +1,12 @@ id = "content-pipeline" name = "Content Creation Pipeline" -description = "Research → Write → Edit pipeline for article creation" +description = "Research a topic, build a structured outline, write a full article, then edit for clarity, flow, and factual consistency." category = "creation" -tags = ["content", "writing", "article"] +tags = ["content", "writing", "article", "research"] [i18n.zh] name = "内容创作流水线" -description = "调研 -> 撰写 -> 编辑的文章创作流水线" +description = "调研主题,构建结构化提纲,撰写完整文章,再编辑润色以提升清晰度、流畅性和事实准确性。" [[parameters]] name = "topic" @@ -14,6 +14,13 @@ description = "The topic to research and write about" param_type = "string" required = true +[[parameters]] +name = "audience" +description = "Target audience (e.g. general public, developers, executives, students)" +param_type = "string" +required = false +default = "general audience" + [[parameters]] name = "word_count" description = "Target word count for the article" @@ -21,16 +28,28 @@ param_type = "string" required = false default = "800-1200" +[[parameters]] +name = "tone" +description = "Desired tone (informative, conversational, technical, persuasive)" +param_type = "string" +required = false +default = "informative" + [[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}}" +prompt_template = "You are a research journalist. Investigate the following topic for a {{audience}} audience:\n1. Background and context — why this topic matters now\n2. Key facts and data points (be specific)\n3. Multiple perspectives — mainstream view, contrarian view, expert consensus\n4. Recent developments or trends\n5. Concrete examples, case studies, or anecdotes\n6. Common misconceptions to address\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}}" +name = "outline" +prompt_template = "You are a content strategist. Create a detailed article outline using the research below.\n\nInclude:\n- Three headline options (hook-driven, question-based, and statement-based)\n- Opening hook strategy\n- H2 sections with H3 subsections and the key point each section makes\n- Which research fact or example belongs in each section\n- Closing argument and call to action\n\nTarget: {{word_count}} words, {{tone}} tone, audience: {{audience}}\n\nResearch:\n{{researcher}}" depends_on = ["researcher"] +[[steps]] +name = "writer" +prompt_template = "Write the full article following the outline. Requirements:\n- Use the best headline from the outline\n- Open with the hook strategy from the outline\n- Short paragraphs (3-4 sentences max)\n- Subheadings for each major section\n- Weave in the specific facts and examples from research — no vague generalities\n- Match the {{tone}} tone throughout\n- End with a concrete takeaway and CTA relevant to a {{audience}} reader\n- Target length: {{word_count}} words\n\nOutline:\n{{outline}}\n\nResearch:\n{{researcher}}" +depends_on = ["outline", "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}}" +prompt_template = "You are a senior editor. Polish the article below:\n1. Fix grammar, punctuation, and spelling\n2. Tighten wordy or repetitive sentences\n3. Improve transitions between sections\n4. Flag any factual claims that seem unsupported and suggest how to strengthen them\n5. Verify the tone is consistent with '{{tone}}' throughout\n\nOutput the final polished article only, then add a brief editor's note listing the main changes made.\n\nDraft:\n{{writer}}" depends_on = ["writer"] diff --git a/workflows/content-review.toml b/workflows/content-review.toml index fd51d1f..2e0d9d6 100644 --- a/workflows/content-review.toml +++ b/workflows/content-review.toml @@ -1,7 +1,7 @@ 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" +category = "creation" tags = ["content", "review", "writing", "editing"] [i18n.zh] diff --git a/workflows/customer-support.toml b/workflows/customer-support.toml index 6b4aeca..378ed55 100644 --- a/workflows/customer-support.toml +++ b/workflows/customer-support.toml @@ -1,7 +1,7 @@ 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" +category = "business" tags = ["support", "triage", "customer-service", "escalation"] [i18n.zh] diff --git a/workflows/data-pipeline.toml b/workflows/data-pipeline.toml index f3e83fb..3137d21 100644 --- a/workflows/data-pipeline.toml +++ b/workflows/data-pipeline.toml @@ -1,36 +1,43 @@ 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"] +name = "Data Analysis & Transform" +description = "Clean, transform, analyse, and summarise raw data. Handles messy inputs: CSV, JSON, tables, or free-form text." +category = "engineering" +tags = ["data", "analysis", "transform", "etl"] [i18n.zh] -name = "数据流水线" -description = "ETL 流水线,从数据源提取数据,转换为目标格式,并验证输出的完整性和正确性。" +name = "数据分析与转换" +description = "清洗、转换、分析并摘要原始数据,支持 CSV、JSON、表格或自由文本等杂乱输入。" [[parameters]] -name = "data_source" -description = "URL or file path to the data source" +name = "raw_data" +description = "The raw data to process (paste CSV, JSON, table, or any structured text)" param_type = "string" required = true [[parameters]] name = "output_format" -description = "Desired output format (json, csv, markdown)" +description = "Desired output format for the transformed data (json, csv, markdown-table)" param_type = "string" required = false default = "json" +[[parameters]] +name = "analysis_goal" +description = "What you want to understand or extract from the data" +param_type = "string" +required = false +default = "general summary and key insights" + [[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." +name = "profile" +prompt_template = "You are a data engineer. Profile the following raw data:\n1. Detected format and structure\n2. Number of rows and columns/fields\n3. Data types per field\n4. Missing value count per field\n5. Obvious data quality issues (duplicates, inconsistent formatting, out-of-range values)\n6. Sample of first 5 rows for reference\n\nRaw data:\n{{raw_data}}" [[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"] +name = "clean_transform" +prompt_template = "Clean and transform the raw data based on the profile below. Apply:\n- Trim whitespace from string fields\n- Normalise dates to ISO-8601\n- Remove exact duplicate rows\n- Convert empty strings to null\n- Standardise inconsistent categorical values (e.g. 'Y'/'Yes'/'yes' → true)\n- Flag but preserve rows with suspicious values (do not silently drop them)\n\nOutput the cleaned data in {{output_format}} format, followed by a change log listing every transformation applied.\n\nData profile:\n{{profile}}\n\nRaw data:\n{{raw_data}}" +depends_on = ["profile"] [[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"] +name = "analyse" +prompt_template = "Analyse the cleaned data to address the following goal: {{analysis_goal}}\n\nProvide:\n1. Key statistics (counts, totals, averages, distributions as appropriate)\n2. Notable patterns or trends\n3. Outliers or anomalies worth investigating\n4. Correlations between fields (if applicable)\n5. Top 3 actionable insights from the data\n\nCleaned data:\n{{clean_transform}}" +depends_on = ["clean_transform"] diff --git a/workflows/translate-polish.toml b/workflows/translate-polish.toml index c3a4162..8753694 100644 --- a/workflows/translate-polish.toml +++ b/workflows/translate-polish.toml @@ -1,12 +1,12 @@ id = "translate-polish" name = "Translation & Polish" -description = "Auto-detect language, translate, and review for naturalness" +description = "Translate text into a target language, then review for accuracy, naturalness, and cultural fit." category = "language" -tags = ["translation", "language", "localization"] +tags = ["translation", "language", "localization", "writing"] [i18n.zh] name = "翻译与润色" -description = "自动检测语言,翻译文本,并审校译文的自然度" +description = "将文本翻译为目标语言,再审校准确性、自然度和文化适配性。" [[parameters]] name = "source_text" @@ -14,11 +14,30 @@ description = "The text to translate" param_type = "string" required = true +[[parameters]] +name = "target_language" +description = "Target language (e.g. English, Chinese, Spanish, Japanese, French)" +param_type = "string" +required = false +default = "auto: if Chinese → English, if English → Chinese, otherwise → English" + +[[parameters]] +name = "register" +description = "Desired register: formal, casual, technical, literary" +param_type = "string" +required = false +default = "match source" + +[[steps]] +name = "translate" +prompt_template = "You are a professional translator. Translate the following text into {{target_language}}.\n\nGuidelines:\n- Preserve the original meaning, tone, and structure as closely as the target language allows\n- Use {{register}} register\n- For idiomatic expressions, translate the meaning rather than word-for-word\n- For proper nouns and technical terms, keep the original with a parenthetical explanation on first use if needed\n- If any passage is ambiguous in the source, note the ambiguity briefly after the translation\n\nSource text:\n{{source_text}}" + [[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}}" +name = "back_translate" +prompt_template = "Back-translate the following {{target_language}} translation into the source language. Do not look at the original — produce an independent translation from the target language only.\n\nThis is used to verify accuracy by comparing the back-translation to the original.\n\nTranslation to back-translate:\n{{translate}}" +depends_on = ["translate"] [[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"] +name = "review_and_polish" +prompt_template = "You are a bilingual editor. Review the translation quality by comparing original, translation, and back-translation.\n\nCheck for:\n1. Meaning shifts — where the back-translation diverges from the original\n2. Unnatural phrasing that sounds translated rather than native\n3. Register consistency (target: {{register}})\n4. Cultural appropriateness for {{target_language}} readers\n\nOutput: the polished final translation only, with a brief note on any changes made.\n\nOriginal:\n{{source_text}}\n\nTranslation:\n{{translate}}\n\nBack-translation:\n{{back_translate}}" +depends_on = ["translate", "back_translate"] diff --git a/workflows/weekly-report.toml b/workflows/weekly-report.toml index d580923..762f1c3 100644 --- a/workflows/weekly-report.toml +++ b/workflows/weekly-report.toml @@ -1,12 +1,12 @@ id = "weekly-report" name = "Weekly Report Generator" -description = "Organize raw work notes into a polished weekly report" -category = "business" -tags = ["report", "weekly", "productivity"] +description = "Turn raw work notes into a polished weekly report with highlights, metrics, blockers, and next week's priorities." +category = "productivity" +tags = ["report", "weekly", "productivity", "management"] [i18n.zh] name = "周报生成器" -description = "将零散的工作笔记整理为一份精炼的周报" +description = "将零散工作笔记整理为规范周报,包含亮点、指标、阻塞项和下周计划。" [[parameters]] name = "work_notes" @@ -14,11 +14,25 @@ description = "Raw work notes, bullet points, or activity log for the week" param_type = "string" required = true +[[parameters]] +name = "team_or_role" +description = "Your team name or role (used to frame context appropriately)" +param_type = "string" +required = false +default = "" + +[[parameters]] +name = "audience" +description = "Who will read this report (manager, team, executive)" +param_type = "string" +required = false +default = "manager" + [[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}}" +name = "extract" +prompt_template = "You are an executive assistant. Parse the following raw work notes and extract every item into structured categories:\n\n**Completed** — fully done tasks (include measurable outcomes if mentioned)\n**In Progress** — work started but not finished (include % complete or next milestone if available)\n**Blockers** — anything preventing progress, and who or what is blocking\n**Decisions Made** — choices or agreements reached this week\n**Metrics** — any numbers mentioned (velocity, usage, revenue, bugs closed, etc.)\n**Upcoming** — planned work mentioned for next week\n\nDo not summarise or rephrase — extract faithfully.\n\nTeam/Role: {{team_or_role}}\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"] +prompt_template = "Write a polished weekly report for a {{audience}} audience. Tone should be professional and concise — no padding.\n\n## Highlights\nTop 3 achievements this week, each in one sentence with measurable impact where available.\n\n## Progress\nGrouped by project or workstream. For each: what was done, current status, and any dependency.\n\n## Metrics\nKey numbers from the week. If none were provided, omit this section.\n\n## Blockers & Risks\nEach blocker: description, impact, owner, and requested action.\n\n## Next Week\nTop 3-5 priorities with owner and expected outcome.\n\n## Notes\nDecisions made, process changes, or anything the audience should be aware of.\n\nExtracted data:\n{{extract}}" +depends_on = ["extract"] From 425a991fbb8ffa37611b3ce6c0de86bc1be3aff1 Mon Sep 17 00:00:00 2001 From: Evan Hu Date: Wed, 1 Apr 2026 19:13:56 +0900 Subject: [PATCH 3/4] style(workflows): convert all prompt_template strings to TOML multiline syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace \n escape sequences with real newlines using triple-quote multiline strings ("""...""") across all 22 workflow templates. No content changes — formatting only. --- workflows/api-design.toml | 40 ++++++++++++++++++-- workflows/blog-post.toml | 59 +++++++++++++++++++++++++++-- workflows/brainstorm.toml | 20 ++++++++-- workflows/bug-triage.toml | 37 ++++++++++++++++-- workflows/code-review.toml | 60 ++++++++++++++++++++++++++++-- workflows/competitor-analysis.toml | 49 ++++++++++++++++++++++-- workflows/content-pipeline.toml | 60 ++++++++++++++++++++++++++++-- workflows/content-review.toml | 27 ++++++++++++-- workflows/customer-support.toml | 41 ++++++++++++++++++-- workflows/data-pipeline.toml | 45 ++++++++++++++++++++-- workflows/decision-matrix.toml | 47 +++++++++++++++++++++-- workflows/incident-postmortem.toml | 54 +++++++++++++++++++++++++-- workflows/job-application.toml | 57 ++++++++++++++++++++++++++-- workflows/learning-plan.toml | 42 +++++++++++++++++++-- workflows/market-research.toml | 56 ++++++++++++++++++++++++++-- workflows/meeting-summary.toml | 48 ++++++++++++++++++++++-- workflows/product-spec.toml | 55 +++++++++++++++++++++++++-- workflows/refactor-plan.toml | 51 +++++++++++++++++++++++-- workflows/research.toml | 39 +++++++++++++++++-- workflows/test-generation.toml | 42 +++++++++++++++++++-- workflows/translate-polish.toml | 44 ++++++++++++++++++++-- workflows/weekly-report.toml | 43 ++++++++++++++++++++- 22 files changed, 946 insertions(+), 70 deletions(-) diff --git a/workflows/api-design.toml b/workflows/api-design.toml index 9f1f8d2..69a16ed 100644 --- a/workflows/api-design.toml +++ b/workflows/api-design.toml @@ -23,14 +23,48 @@ default = "" [[steps]] name = "resource_model" -prompt_template = "You are an API architect. From the requirements below, identify the core resources and their relationships:\n1. List every resource (noun)\n2. Define attributes and types for each\n3. Map relationships (one-to-many, many-to-many)\n4. Identify which resources need CRUD vs. action-oriented endpoints\n\nRequirements:\n{{requirements}}\n\nTech stack / conventions:\n{{tech_stack}}" +prompt_template = """ +You are an API architect. From the requirements below, identify the core resources and their relationships: +1. List every resource (noun) +2. Define attributes and types for each +3. Map relationships (one-to-many, many-to-many) +4. Identify which resources need CRUD vs. action-oriented endpoints + +Requirements: +{{requirements}} + +Tech stack / conventions: +{{tech_stack}} +""" [[steps]] name = "endpoint_design" -prompt_template = "Design the full set of REST endpoints based on the resource model. For each endpoint specify:\n- Method + path\n- Path/query parameters\n- Request body schema (JSON)\n- Success response schema + status code\n- Error responses (4xx, 5xx)\n- Auth requirement\n- Idempotency and side-effect notes\n\nResource model:\n{{resource_model}}" +prompt_template = """ +Design the full set of REST endpoints based on the resource model. For each endpoint specify: +- Method + path +- Path/query parameters +- Request body schema (JSON) +- Success response schema + status code +- Error responses (4xx, 5xx) +- Auth requirement +- Idempotency and side-effect notes + +Resource model: +{{resource_model}} +""" depends_on = ["resource_model"] [[steps]] name = "openapi_spec" -prompt_template = "Write a complete OpenAPI 3.1 YAML specification for the API designed above. Include:\n- info block with title, version, description\n- All paths with operations\n- Reusable schemas in components/schemas\n- Security schemes\n- Example request/response bodies\n\nEndpoint design:\n{{endpoint_design}}" +prompt_template = """ +Write a complete OpenAPI 3.1 YAML specification for the API designed above. Include: +- info block with title, version, description +- All paths with operations +- Reusable schemas in components/schemas +- Security schemes +- Example request/response bodies + +Endpoint design: +{{endpoint_design}} +""" depends_on = ["endpoint_design"] diff --git a/workflows/blog-post.toml b/workflows/blog-post.toml index 7bb0acd..b16f08c 100644 --- a/workflows/blog-post.toml +++ b/workflows/blog-post.toml @@ -30,19 +30,70 @@ default = "informative and engaging" [[steps]] name = "research" -prompt_template = "You are a research journalist. For the blog topic below, compile:\n1. Key facts, statistics, and data points (with source type)\n2. Common misconceptions to debunk\n3. Expert perspectives and contrasting views\n4. Recent developments or trends\n5. Concrete examples and case studies\n6. Angles that haven't been covered well in existing content\n\nTopic: {{topic}}\nAudience: {{audience}}" +prompt_template = """ +You are a research journalist. For the blog topic below, compile: +1. Key facts, statistics, and data points (with source type) +2. Common misconceptions to debunk +3. Expert perspectives and contrasting views +4. Recent developments or trends +5. Concrete examples and case studies +6. Angles that haven't been covered well in existing content + +Topic: {{topic}} +Audience: {{audience}} +""" [[steps]] name = "outline" -prompt_template = "You are a content strategist. Create a detailed blog post outline:\n- Compelling headline (3 options)\n- Hook / opening angle\n- H2 sections with H3 subsections\n- Key point per section\n- Data or example to use in each section\n- Conclusion and CTA\n\nTarget length: 1200-1800 words.\nTone: {{tone}}\nAudience: {{audience}}\n\nResearch:\n{{research}}" +prompt_template = """ +You are a content strategist. Create a detailed blog post outline: +- Compelling headline (3 options) +- Hook / opening angle +- H2 sections with H3 subsections +- Key point per section +- Data or example to use in each section +- Conclusion and CTA + +Target length: 1200-1800 words. +Tone: {{tone}} +Audience: {{audience}} + +Research: +{{research}} +""" depends_on = ["research"] [[steps]] name = "draft" -prompt_template = "Write the full blog post following the outline. Guidelines:\n- Open with a hook that immediately addresses the reader's pain or curiosity\n- Use short paragraphs (3-4 sentences max)\n- Include the statistics and examples from research\n- Use subheadings to aid scannability\n- End with a clear takeaway and one actionable CTA\n- Tone: {{tone}}\n\nOutline:\n{{outline}}\n\nResearch:\n{{research}}" +prompt_template = """ +Write the full blog post following the outline. Guidelines: +- Open with a hook that immediately addresses the reader's pain or curiosity +- Use short paragraphs (3-4 sentences max) +- Include the statistics and examples from research +- Use subheadings to aid scannability +- End with a clear takeaway and one actionable CTA +- Tone: {{tone}} + +Outline: +{{outline}} + +Research: +{{research}} +""" depends_on = ["outline", "research"] [[steps]] name = "seo_optimise" -prompt_template = "SEO-optimise the blog post:\n1. **Primary keyword** — identify the best target keyword\n2. **Meta title** (under 60 chars) and **meta description** (under 155 chars)\n3. **Keyword placement** — suggest where to naturally insert the primary keyword and 3 secondary keywords\n4. **Internal link opportunities** — topics to link to\n5. **Image alt text suggestions** — 2-3 descriptive alts\n6. **Revised headline** if needed for keyword inclusion\n\nDraft:\n{{draft}}" +prompt_template = """ +SEO-optimise the blog post: +1. **Primary keyword** — identify the best target keyword +2. **Meta title** (under 60 chars) and **meta description** (under 155 chars) +3. **Keyword placement** — suggest where to naturally insert the primary keyword and 3 secondary keywords +4. **Internal link opportunities** — topics to link to +5. **Image alt text suggestions** — 2-3 descriptive alts +6. **Revised headline** if needed for keyword inclusion + +Draft: +{{draft}} +""" depends_on = ["draft"] diff --git a/workflows/brainstorm.toml b/workflows/brainstorm.toml index 58d29a4..7311ea9 100644 --- a/workflows/brainstorm.toml +++ b/workflows/brainstorm.toml @@ -16,14 +16,28 @@ 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}}" +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. + +Challenge: {{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}}" +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. + +Ideas: +{{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}}" +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. + +Evaluation: +{{evaluator}} +""" depends_on = ["evaluator"] diff --git a/workflows/bug-triage.toml b/workflows/bug-triage.toml index 8b413cc..1253564 100644 --- a/workflows/bug-triage.toml +++ b/workflows/bug-triage.toml @@ -23,14 +23,45 @@ default = "" [[steps]] name = "reproduce_path" -prompt_template = "You are a senior engineer doing bug triage. Given the bug report below, reconstruct the exact failure path:\n1. Preconditions that must be true\n2. Step-by-step sequence that triggers the bug\n3. What the system does vs. what it should do\n4. Affected components and data flow\n\nBug report:\n{{bug_report}}\n\nCodebase context:\n{{codebase_context}}" +prompt_template = """ +You are a senior engineer doing bug triage. Given the bug report below, reconstruct the exact failure path: +1. Preconditions that must be true +2. Step-by-step sequence that triggers the bug +3. What the system does vs. what it should do +4. Affected components and data flow + +Bug report: +{{bug_report}} + +Codebase context: +{{codebase_context}} +""" [[steps]] name = "root_cause" -prompt_template = "You are a debugging expert. Based on the failure path analysis, identify the root cause:\n1. Immediate cause (the direct code/logic fault)\n2. Contributing factors (environment, race condition, assumption violation)\n3. Why this was not caught earlier (missing test, wrong assumption)\n4. Blast radius — what else could be affected\n\nFailure path:\n{{reproduce_path}}" +prompt_template = """ +You are a debugging expert. Based on the failure path analysis, identify the root cause: +1. Immediate cause (the direct code/logic fault) +2. Contributing factors (environment, race condition, assumption violation) +3. Why this was not caught earlier (missing test, wrong assumption) +4. Blast radius — what else could be affected + +Failure path: +{{reproduce_path}} +""" depends_on = ["reproduce_path"] [[steps]] name = "fix_plan" -prompt_template = "You are a tech lead. Produce a concrete fix plan:\n1. **Recommended fix** — specific code change with rationale\n2. **Alternative approaches** — trade-offs of each\n3. **Test cases to add** — unit, integration, regression\n4. **Rollout recommendation** — hotfix vs. normal release, feature flag needed?\n5. **Prevention** — process or tooling changes to prevent recurrence\n\nRoot cause analysis:\n{{root_cause}}" +prompt_template = """ +You are a tech lead. Produce a concrete fix plan: +1. **Recommended fix** — specific code change with rationale +2. **Alternative approaches** — trade-offs of each +3. **Test cases to add** — unit, integration, regression +4. **Rollout recommendation** — hotfix vs. normal release, feature flag needed? +5. **Prevention** — process or tooling changes to prevent recurrence + +Root cause analysis: +{{root_cause}} +""" depends_on = ["root_cause"] diff --git a/workflows/code-review.toml b/workflows/code-review.toml index 03b625b..8988866 100644 --- a/workflows/code-review.toml +++ b/workflows/code-review.toml @@ -30,17 +30,69 @@ 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}}" +prompt_template = """ +Review the following {{language}} code for correctness. Analyse: +- Logic errors and edge cases +- Error handling completeness +- Null/undefined safety +- Off-by-one errors and boundary conditions +- Resource leaks (memory, file handles, connections) +- Concurrency issues (race conditions, deadlocks) + +Context: {{context}} + +Code: +{{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}}" +prompt_template = """ +Perform a security review of the following {{language}} code. Check for: +- Injection vulnerabilities (SQL, command, XSS) +- Authentication and authorisation flaws +- Sensitive data exposure (logging secrets, hardcoded credentials) +- Input validation gaps +- Insecure cryptographic usage +- Path traversal and SSRF risks +- Dependency vulnerabilities + +Context: {{context}} + +Code: +{{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}}" +prompt_template = """ +Review the following {{language}} code for style and maintainability. Evaluate: +- Naming conventions and clarity +- Function/method length and complexity +- Code duplication +- Documentation and comments quality +- Consistent formatting +- Appropriate use of language idioms +- API design and public interface clarity + +Context: {{context}} + +Code: +{{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}}" +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. + +Correctness review: +{{review_correctness}} + +Security review: +{{review_security}} + +Style review: +{{review_style}} +""" depends_on = ["review_correctness", "review_security", "review_style"] diff --git a/workflows/competitor-analysis.toml b/workflows/competitor-analysis.toml index f1a935c..e3c23e3 100644 --- a/workflows/competitor-analysis.toml +++ b/workflows/competitor-analysis.toml @@ -22,14 +22,57 @@ required = true [[steps]] name = "competitor_profiles" -prompt_template = "You are a market analyst. For each competitor listed, create a profile:\n- Core product and value proposition\n- Target customer segment\n- Pricing model and tiers\n- Key features and differentiators\n- Known weaknesses or complaints (from reviews, forums)\n- Go-to-market strategy\n- Estimated market share or traction signals\n\nOur product: {{product}}\nCompetitors: {{competitors}}" +prompt_template = """ +You are a market analyst. For each competitor listed, create a profile: +- Core product and value proposition +- Target customer segment +- Pricing model and tiers +- Key features and differentiators +- Known weaknesses or complaints (from reviews, forums) +- Go-to-market strategy +- Estimated market share or traction signals + +Our product: {{product}} +Competitors: {{competitors}} +""" [[steps]] name = "swot_comparison" -prompt_template = "Perform a comparative SWOT analysis:\n1. For each competitor: their Strengths, Weaknesses, Opportunities they exploit, Threats they face\n2. Our position relative to each on: product depth, pricing, UX, distribution, brand\n3. Whitespace — what pain points do all competitors fail to address?\n\nCompetitor profiles:\n{{competitor_profiles}}" +prompt_template = """ +Perform a comparative SWOT analysis: +1. For each competitor: their Strengths, Weaknesses, Opportunities they exploit, Threats they face +2. Our position relative to each on: product depth, pricing, UX, distribution, brand +3. Whitespace — what pain points do all competitors fail to address? + +Competitor profiles: +{{competitor_profiles}} +""" depends_on = ["competitor_profiles"] [[steps]] name = "strategy_report" -prompt_template = "Write a strategic positioning report:\n\n## Market Landscape\nSummary of the competitive field.\n\n## Our Differentiation\nWhere we win, where we are at parity, where we lag.\n\n## Attack Vectors\n3 specific opportunities to take share from each competitor.\n\n## Defensive Priorities\nWhat strengths to reinforce before competitors close the gap.\n\n## Recommended Positioning Statement\nOne sentence that clearly differentiates us from all listed competitors.\n\n## 90-Day Action Items\nTop 5 concrete actions sorted by impact.\n\nSWOT comparison:\n{{swot_comparison}}" +prompt_template = """ +Write a strategic positioning report: + +## Market Landscape +Summary of the competitive field. + +## Our Differentiation +Where we win, where we are at parity, where we lag. + +## Attack Vectors +3 specific opportunities to take share from each competitor. + +## Defensive Priorities +What strengths to reinforce before competitors close the gap. + +## Recommended Positioning Statement +One sentence that clearly differentiates us from all listed competitors. + +## 90-Day Action Items +Top 5 concrete actions sorted by impact. + +SWOT comparison: +{{swot_comparison}} +""" depends_on = ["swot_comparison"] diff --git a/workflows/content-pipeline.toml b/workflows/content-pipeline.toml index 2307451..b1ef950 100644 --- a/workflows/content-pipeline.toml +++ b/workflows/content-pipeline.toml @@ -37,19 +37,71 @@ default = "informative" [[steps]] name = "researcher" -prompt_template = "You are a research journalist. Investigate the following topic for a {{audience}} audience:\n1. Background and context — why this topic matters now\n2. Key facts and data points (be specific)\n3. Multiple perspectives — mainstream view, contrarian view, expert consensus\n4. Recent developments or trends\n5. Concrete examples, case studies, or anecdotes\n6. Common misconceptions to address\n\nTopic: {{topic}}" +prompt_template = """ +You are a research journalist. Investigate the following topic for a {{audience}} audience: +1. Background and context — why this topic matters now +2. Key facts and data points (be specific) +3. Multiple perspectives — mainstream view, contrarian view, expert consensus +4. Recent developments or trends +5. Concrete examples, case studies, or anecdotes +6. Common misconceptions to address + +Topic: {{topic}} +""" [[steps]] name = "outline" -prompt_template = "You are a content strategist. Create a detailed article outline using the research below.\n\nInclude:\n- Three headline options (hook-driven, question-based, and statement-based)\n- Opening hook strategy\n- H2 sections with H3 subsections and the key point each section makes\n- Which research fact or example belongs in each section\n- Closing argument and call to action\n\nTarget: {{word_count}} words, {{tone}} tone, audience: {{audience}}\n\nResearch:\n{{researcher}}" +prompt_template = """ +You are a content strategist. Create a detailed article outline using the research below. + +Include: +- Three headline options (hook-driven, question-based, and statement-based) +- Opening hook strategy +- H2 sections with H3 subsections and the key point each section makes +- Which research fact or example belongs in each section +- Closing argument and call to action + +Target: {{word_count}} words, {{tone}} tone, audience: {{audience}} + +Research: +{{researcher}} +""" depends_on = ["researcher"] [[steps]] name = "writer" -prompt_template = "Write the full article following the outline. Requirements:\n- Use the best headline from the outline\n- Open with the hook strategy from the outline\n- Short paragraphs (3-4 sentences max)\n- Subheadings for each major section\n- Weave in the specific facts and examples from research — no vague generalities\n- Match the {{tone}} tone throughout\n- End with a concrete takeaway and CTA relevant to a {{audience}} reader\n- Target length: {{word_count}} words\n\nOutline:\n{{outline}}\n\nResearch:\n{{researcher}}" +prompt_template = """ +Write the full article following the outline. Requirements: +- Use the best headline from the outline +- Open with the hook strategy from the outline +- Short paragraphs (3-4 sentences max) +- Subheadings for each major section +- Weave in the specific facts and examples from research — no vague generalities +- Match the {{tone}} tone throughout +- End with a concrete takeaway and CTA relevant to a {{audience}} reader +- Target length: {{word_count}} words + +Outline: +{{outline}} + +Research: +{{researcher}} +""" depends_on = ["outline", "researcher"] [[steps]] name = "editor" -prompt_template = "You are a senior editor. Polish the article below:\n1. Fix grammar, punctuation, and spelling\n2. Tighten wordy or repetitive sentences\n3. Improve transitions between sections\n4. Flag any factual claims that seem unsupported and suggest how to strengthen them\n5. Verify the tone is consistent with '{{tone}}' throughout\n\nOutput the final polished article only, then add a brief editor's note listing the main changes made.\n\nDraft:\n{{writer}}" +prompt_template = """ +You are a senior editor. Polish the article below: +1. Fix grammar, punctuation, and spelling +2. Tighten wordy or repetitive sentences +3. Improve transitions between sections +4. Flag any factual claims that seem unsupported and suggest how to strengthen them +5. Verify the tone is consistent with '{{tone}}' throughout + +Output the final polished article only, then add a brief editor's note listing the main changes made. + +Draft: +{{writer}} +""" depends_on = ["writer"] diff --git a/workflows/content-review.toml b/workflows/content-review.toml index 2e0d9d6..d2ef18d 100644 --- a/workflows/content-review.toml +++ b/workflows/content-review.toml @@ -34,15 +34,36 @@ prompt_template = "Write a {{tone}} article about {{topic}} with approximately { [[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}}" +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. + +Draft: +{{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}}" +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. + +Draft: +{{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}}" +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. + +Original draft: +{{draft}} + +Quality feedback: +{{review_quality}} + +Accuracy feedback: +{{review_accuracy}} +""" depends_on = ["review_quality", "review_accuracy"] diff --git a/workflows/customer-support.toml b/workflows/customer-support.toml index 378ed55..09c737a 100644 --- a/workflows/customer-support.toml +++ b/workflows/customer-support.toml @@ -30,14 +30,49 @@ 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}}" +prompt_template = """ +Classify the following customer support request. Determine: +1. Category: billing, technical, account, feature-request, bug-report, or general +2. Urgency: low, medium, high, critical +3. Sentiment: positive, neutral, frustrated, angry +4. Whether escalation to a human specialist is needed (true/false) + +Return a structured assessment with reasoning for each classification. + +Product context: {{product_context}} + +Customer message: +{{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}}" +prompt_template = """ +Draft a helpful, empathetic support response for {{customer_name}} based on the classification below. The response should: +- Acknowledge the customer's concern +- Provide a clear solution or next steps +- Match the appropriate tone for the detected sentiment +- Include specific action items + +Classification: +{{classify}} + +Original message: +{{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}}" +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. + +If no escalation is needed, confirm the drafted response is complete and ready to send. + +Classification: +{{classify}} + +Drafted response: +{{draft_response}} +""" depends_on = ["classify", "draft_response"] diff --git a/workflows/data-pipeline.toml b/workflows/data-pipeline.toml index 3137d21..74afeaa 100644 --- a/workflows/data-pipeline.toml +++ b/workflows/data-pipeline.toml @@ -30,14 +30,53 @@ default = "general summary and key insights" [[steps]] name = "profile" -prompt_template = "You are a data engineer. Profile the following raw data:\n1. Detected format and structure\n2. Number of rows and columns/fields\n3. Data types per field\n4. Missing value count per field\n5. Obvious data quality issues (duplicates, inconsistent formatting, out-of-range values)\n6. Sample of first 5 rows for reference\n\nRaw data:\n{{raw_data}}" +prompt_template = """ +You are a data engineer. Profile the following raw data: +1. Detected format and structure +2. Number of rows and columns/fields +3. Data types per field +4. Missing value count per field +5. Obvious data quality issues (duplicates, inconsistent formatting, out-of-range values) +6. Sample of first 5 rows for reference + +Raw data: +{{raw_data}} +""" [[steps]] name = "clean_transform" -prompt_template = "Clean and transform the raw data based on the profile below. Apply:\n- Trim whitespace from string fields\n- Normalise dates to ISO-8601\n- Remove exact duplicate rows\n- Convert empty strings to null\n- Standardise inconsistent categorical values (e.g. 'Y'/'Yes'/'yes' → true)\n- Flag but preserve rows with suspicious values (do not silently drop them)\n\nOutput the cleaned data in {{output_format}} format, followed by a change log listing every transformation applied.\n\nData profile:\n{{profile}}\n\nRaw data:\n{{raw_data}}" +prompt_template = """ +Clean and transform the raw data based on the profile below. Apply: +- Trim whitespace from string fields +- Normalise dates to ISO-8601 +- Remove exact duplicate rows +- Convert empty strings to null +- Standardise inconsistent categorical values (e.g. 'Y'/'Yes'/'yes' → true) +- Flag but preserve rows with suspicious values (do not silently drop them) + +Output the cleaned data in {{output_format}} format, followed by a change log listing every transformation applied. + +Data profile: +{{profile}} + +Raw data: +{{raw_data}} +""" depends_on = ["profile"] [[steps]] name = "analyse" -prompt_template = "Analyse the cleaned data to address the following goal: {{analysis_goal}}\n\nProvide:\n1. Key statistics (counts, totals, averages, distributions as appropriate)\n2. Notable patterns or trends\n3. Outliers or anomalies worth investigating\n4. Correlations between fields (if applicable)\n5. Top 3 actionable insights from the data\n\nCleaned data:\n{{clean_transform}}" +prompt_template = """ +Analyse the cleaned data to address the following goal: {{analysis_goal}} + +Provide: +1. Key statistics (counts, totals, averages, distributions as appropriate) +2. Notable patterns or trends +3. Outliers or anomalies worth investigating +4. Correlations between fields (if applicable) +5. Top 3 actionable insights from the data + +Cleaned data: +{{clean_transform}} +""" depends_on = ["clean_transform"] diff --git a/workflows/decision-matrix.toml b/workflows/decision-matrix.toml index 28eaf14..9a67e34 100644 --- a/workflows/decision-matrix.toml +++ b/workflows/decision-matrix.toml @@ -22,14 +22,55 @@ required = true [[steps]] name = "criteria" -prompt_template = "You are a decision analyst. For the decision below, define the evaluation criteria:\n1. List 5-8 criteria that matter most for this decision\n2. For each criterion: define what 'good' looks like (high score) and 'bad' looks like (low score)\n3. Assign weights (must sum to 100%) based on business importance\n4. Note which criteria are must-haves (disqualifiers if failed)\n\nDecision: {{decision}}\nOptions: {{options}}" +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.\n\nFormat as a table: Option | Criterion | Raw Score | Weight | Weighted Score.\n\nAdd a totals row per option.\n\nDecision: {{decision}}\nOptions: {{options}}\n\nCriteria and weights:\n{{criteria}}" +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:\n\n## Recommendation\nClear winner with one-sentence rationale.\n\n## Why Not the Others\nFor each non-recommended option: the decisive weakness.\n\n## Key Risks of the Recommended Option\nTop 3 risks and mitigations.\n\n## Conditions That Would Change This Recommendation\nWhat new information would flip the decision.\n\n## Next Steps\n3 immediate actions to execute the decision.\n\nScoring:\n{{scoring}}" +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"] diff --git a/workflows/incident-postmortem.toml b/workflows/incident-postmortem.toml index 76d0aee..4eda2ff 100644 --- a/workflows/incident-postmortem.toml +++ b/workflows/incident-postmortem.toml @@ -23,14 +23,62 @@ default = "" [[steps]] name = "timeline" -prompt_template = "You are an SRE writing a postmortem. From the raw incident notes below, reconstruct a clean chronological timeline:\n- Format: [HH:MM UTC] — event description\n- Include: first alert, detection, escalation, mitigation steps, resolution\n- Note who was involved at each stage\n- Mark the start and end of user impact\n\nService: {{service_name}}\n\nRaw notes:\n{{incident_notes}}" +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:\n1. Immediate trigger\n2. Five-whys chain down to the systemic root cause\n3. Contributing factors (monitoring gaps, process failures, dependency issues)\n4. Detection gap — why it took as long as it did to detect\n\nTimeline:\n{{timeline}}" +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:\n\n## Summary\nOne paragraph: what happened, impact, duration, resolution.\n\n## Impact\nQuantified: users affected, error rate, revenue/SLA impact.\n\n## Timeline\n(Use the timeline above)\n\n## Root Cause\n(Use the RCA above)\n\n## What Went Well\n## What Went Wrong\n## Action Items\nTable: | Action | Owner | Priority | Due date |\nMinimum 5 concrete, measurable actions.\n\n## Lessons Learned\n\nTimeline:\n{{timeline}}\n\nRoot cause analysis:\n{{root_cause_analysis}}" +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"] diff --git a/workflows/job-application.toml b/workflows/job-application.toml index c3f1e7a..230a9b8 100644 --- a/workflows/job-application.toml +++ b/workflows/job-application.toml @@ -22,19 +22,68 @@ required = true [[steps]] name = "job_analysis" -prompt_template = "Analyse the job posting as an experienced recruiter:\n1. **Must-have requirements** — skills/experience that are non-negotiable\n2. **Nice-to-have requirements** — preferred but not required\n3. **Company signals** — culture, values, team dynamics from the language used\n4. **Role signals** — what success looks like in 90 days, key challenges\n5. **Keywords** — ATS-critical terms to include in application materials\n6. **Red flags** — anything unusual or concerning in the posting\n\nJob posting:\n{{job_posting}}" +prompt_template = """ +Analyse the job posting as an experienced recruiter: +1. **Must-have requirements** — skills/experience that are non-negotiable +2. **Nice-to-have requirements** — preferred but not required +3. **Company signals** — culture, values, team dynamics from the language used +4. **Role signals** — what success looks like in 90 days, key challenges +5. **Keywords** — ATS-critical terms to include in application materials +6. **Red flags** — anything unusual or concerning in the posting + +Job posting: +{{job_posting}} +""" [[steps]] name = "resume_tailoring" -prompt_template = "Tailor the resume for this specific role:\n1. **Reorder sections** — put most relevant experience first\n2. **Rewrite bullet points** — for each experience, suggest stronger versions that match job keywords\n3. **Quantify impacts** — flag any bullet points that should have metrics added\n4. **Gaps to address** — experience or skills missing vs. the role requirements\n5. **Summary statement** — write a 3-sentence tailored summary for the top of the resume\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +prompt_template = """ +Tailor the resume for this specific role: +1. **Reorder sections** — put most relevant experience first +2. **Rewrite bullet points** — for each experience, suggest stronger versions that match job keywords +3. **Quantify impacts** — flag any bullet points that should have metrics added +4. **Gaps to address** — experience or skills missing vs. the role requirements +5. **Summary statement** — write a 3-sentence tailored summary for the top of the resume + +Job analysis: +{{job_analysis}} + +Resume: +{{resume}} +""" depends_on = ["job_analysis"] [[steps]] name = "cover_letter" -prompt_template = "Write a compelling cover letter (3-4 paragraphs, under 400 words):\n- Opening: specific hook connecting your background to the company's mission\n- Body: 2 concrete achievements that directly address the job's must-haves\n- Closing: clear ask + why this specific company\n\nAvoid clichés like 'I am writing to apply' or 'I am a hard worker'.\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +prompt_template = """ +Write a compelling cover letter (3-4 paragraphs, under 400 words): +- Opening: specific hook connecting your background to the company's mission +- Body: 2 concrete achievements that directly address the job's must-haves +- Closing: clear ask + why this specific company + +Avoid clichés like 'I am writing to apply' or 'I am a hard worker'. + +Job analysis: +{{job_analysis}} + +Resume: +{{resume}} +""" depends_on = ["job_analysis"] [[steps]] name = "interview_prep" -prompt_template = "Prepare interview talking points:\n1. **STAR stories** — 3 specific situations from the resume mapped to the job's key requirements\n2. **Questions to ask** — 5 smart questions that show deep interest\n3. **Difficult questions** — likely tough questions for this role with suggested answers\n4. **Salary research** — how to position compensation discussion\n\nJob analysis:\n{{job_analysis}}\n\nResume:\n{{resume}}" +prompt_template = """ +Prepare interview talking points: +1. **STAR stories** — 3 specific situations from the resume mapped to the job's key requirements +2. **Questions to ask** — 5 smart questions that show deep interest +3. **Difficult questions** — likely tough questions for this role with suggested answers +4. **Salary research** — how to position compensation discussion + +Job analysis: +{{job_analysis}} + +Resume: +{{resume}} +""" depends_on = ["job_analysis", "resume_tailoring"] diff --git a/workflows/learning-plan.toml b/workflows/learning-plan.toml index 7eb177d..052f139 100644 --- a/workflows/learning-plan.toml +++ b/workflows/learning-plan.toml @@ -37,14 +37,50 @@ default = "5 hours per week" [[steps]] name = "gap_analysis" -prompt_template = "You are an expert educator in {{skill}}. Analyse the learner's situation:\n1. **Knowledge map** — the full topic broken into sub-skills and concepts\n2. **Current position** — what they likely know given their stated level\n3. **Target position** — what they need to know to reach their goal\n4. **Critical gaps** — the 5 most important things to learn first\n5. **Common pitfalls** — mistakes beginners make, concepts people find hardest\n\nSkill: {{skill}}\nCurrent level: {{current_level}}\nGoal: {{goal}}" +prompt_template = """ +You are an expert educator in {{skill}}. Analyse the learner's situation: +1. **Knowledge map** — the full topic broken into sub-skills and concepts +2. **Current position** — what they likely know given their stated level +3. **Target position** — what they need to know to reach their goal +4. **Critical gaps** — the 5 most important things to learn first +5. **Common pitfalls** — mistakes beginners make, concepts people find hardest + +Skill: {{skill}} +Current level: {{current_level}} +Goal: {{goal}} +""" [[steps]] name = "roadmap" -prompt_template = "Design a learning roadmap divided into phases. For each phase:\n- Name and duration estimate\n- Learning objectives (what they'll be able to do)\n- Core concepts to master\n- 3-5 specific resources (books, courses, docs, tutorials — real names where possible)\n- Practice project or exercise\n- How to know the phase is complete (milestone)\n\nTime available: {{time_available}}\n\nGap analysis:\n{{gap_analysis}}" +prompt_template = """ +Design a learning roadmap divided into phases. For each phase: +- Name and duration estimate +- Learning objectives (what they'll be able to do) +- Core concepts to master +- 3-5 specific resources (books, courses, docs, tutorials — real names where possible) +- Practice project or exercise +- How to know the phase is complete (milestone) + +Time available: {{time_available}} + +Gap analysis: +{{gap_analysis}} +""" depends_on = ["gap_analysis"] [[steps]] name = "week1_plan" -prompt_template = "Create a concrete day-by-day plan for the first week of learning. For each day:\n- Specific topic to cover\n- Exact resource to use (chapter, video, section)\n- Time estimate\n- Exercise or thing to build/practice\n- End-of-day check: how to verify understanding\n\nAssume {{time_available}} is available.\n\nRoadmap:\n{{roadmap}}" +prompt_template = """ +Create a concrete day-by-day plan for the first week of learning. For each day: +- Specific topic to cover +- Exact resource to use (chapter, video, section) +- Time estimate +- Exercise or thing to build/practice +- End-of-day check: how to verify understanding + +Assume {{time_available}} is available. + +Roadmap: +{{roadmap}} +""" depends_on = ["roadmap"] diff --git a/workflows/market-research.toml b/workflows/market-research.toml index f85a34b..8e1d02c 100644 --- a/workflows/market-research.toml +++ b/workflows/market-research.toml @@ -23,14 +23,64 @@ default = "" [[steps]] name = "market_landscape" -prompt_template = "You are a market research analyst. Map the current landscape for: {{market}}\n\n1. **Market definition** — precise scope and adjacent markets\n2. **Market size** — TAM, SAM, SOM estimates with methodology\n3. **Growth rate** — historical and projected CAGR\n4. **Maturity stage** — emerging / growth / mature / declining\n5. **Key trends** — top 5 forces shaping the market (technology, regulation, behaviour)\n6. **Geographic distribution** — where activity is concentrated\n\nContext: {{business_context}}" +prompt_template = """ +You are a market research analyst. Map the current landscape for: {{market}} + +1. **Market definition** — precise scope and adjacent markets +2. **Market size** — TAM, SAM, SOM estimates with methodology +3. **Growth rate** — historical and projected CAGR +4. **Maturity stage** — emerging / growth / mature / declining +5. **Key trends** — top 5 forces shaping the market (technology, regulation, behaviour) +6. **Geographic distribution** — where activity is concentrated + +Context: {{business_context}} +""" [[steps]] name = "customer_segments" -prompt_template = "Identify and profile the customer segments in this market:\n\nFor each segment (aim for 3-5):\n- Name and size\n- Demographics/firmographics\n- Key pain points and jobs-to-be-done\n- Current solutions they use\n- Willingness to pay signals\n- Acquisition channels\n- Which segment is most underserved\n\nMarket landscape:\n{{market_landscape}}" +prompt_template = """ +Identify and profile the customer segments in this market: + +For each segment (aim for 3-5): +- Name and size +- Demographics/firmographics +- Key pain points and jobs-to-be-done +- Current solutions they use +- Willingness to pay signals +- Acquisition channels +- Which segment is most underserved + +Market landscape: +{{market_landscape}} +""" depends_on = ["market_landscape"] [[steps]] name = "research_report" -prompt_template = "Write a structured market research report:\n\n## Executive Summary\n3 bullet points: opportunity, risk, recommended entry point.\n\n## Market Overview\n## Customer Segments\n## Competitive Landscape\nTop players by segment, their moats and vulnerabilities.\n\n## Market Entry Analysis\n- Best beachhead segment\n- Entry barriers and how to overcome them\n- Differentiation opportunities\n- Estimated time to meaningful traction\n\n## Key Risks\n## Recommended Next Steps\n\nMarket landscape:\n{{market_landscape}}\n\nCustomer segments:\n{{customer_segments}}" +prompt_template = """ +Write a structured market research report: + +## Executive Summary +3 bullet points: opportunity, risk, recommended entry point. + +## Market Overview +## Customer Segments +## Competitive Landscape +Top players by segment, their moats and vulnerabilities. + +## Market Entry Analysis +- Best beachhead segment +- Entry barriers and how to overcome them +- Differentiation opportunities +- Estimated time to meaningful traction + +## Key Risks +## Recommended Next Steps + +Market landscape: +{{market_landscape}} + +Customer segments: +{{customer_segments}} +""" depends_on = ["market_landscape", "customer_segments"] diff --git a/workflows/meeting-summary.toml b/workflows/meeting-summary.toml index 8c48062..c36eba1 100644 --- a/workflows/meeting-summary.toml +++ b/workflows/meeting-summary.toml @@ -23,14 +23,56 @@ default = "" [[steps]] name = "structured_summary" -prompt_template = "You are an executive assistant. From the raw meeting notes below, extract:\n\n**Key Discussion Points** — 3-7 bullet points on what was discussed\n**Decisions Made** — each decision with rationale and who decided\n**Open Questions** — unresolved items that need follow-up\n**Blockers & Risks** — anything flagged as blocking progress\n\nContext: {{meeting_context}}\n\nNotes:\n{{notes}}" +prompt_template = """ +You are an executive assistant. From the raw meeting notes below, extract: + +**Key Discussion Points** — 3-7 bullet points on what was discussed +**Decisions Made** — each decision with rationale and who decided +**Open Questions** — unresolved items that need follow-up +**Blockers & Risks** — anything flagged as blocking progress + +Context: {{meeting_context}} + +Notes: +{{notes}} +""" [[steps]] name = "action_items" -prompt_template = "Extract all action items from the meeting. For each:\n- Action: specific, measurable task\n- Owner: person responsible (use name from notes)\n- Due date: explicit date or relative (e.g. 'by next Friday')\n- Priority: High / Medium / Low\n- Dependencies: what must happen first\n\nFormat as a table.\n\nSummary:\n{{structured_summary}}\n\nNotes:\n{{notes}}" +prompt_template = """ +Extract all action items from the meeting. For each: +- Action: specific, measurable task +- Owner: person responsible (use name from notes) +- Due date: explicit date or relative (e.g. 'by next Friday') +- Priority: High / Medium / Low +- Dependencies: what must happen first + +Format as a table. + +Summary: +{{structured_summary}} + +Notes: +{{notes}} +""" depends_on = ["structured_summary"] [[steps]] name = "followup_email" -prompt_template = "Write a professional follow-up email to send to all attendees. Include:\n- Subject line\n- Brief recap (2-3 sentences)\n- Decisions section\n- Action items table (owner, task, due date)\n- Next steps / next meeting placeholder\n\nKeep tone professional but concise. Use the attendees' first names.\n\nSummary:\n{{structured_summary}}\n\nAction items:\n{{action_items}}" +prompt_template = """ +Write a professional follow-up email to send to all attendees. Include: +- Subject line +- Brief recap (2-3 sentences) +- Decisions section +- Action items table (owner, task, due date) +- Next steps / next meeting placeholder + +Keep tone professional but concise. Use the attendees' first names. + +Summary: +{{structured_summary}} + +Action items: +{{action_items}} +""" depends_on = ["structured_summary", "action_items"] diff --git a/workflows/product-spec.toml b/workflows/product-spec.toml index c7c9373..e977d3b 100644 --- a/workflows/product-spec.toml +++ b/workflows/product-spec.toml @@ -23,14 +23,63 @@ default = "" [[steps]] name = "problem_definition" -prompt_template = "You are a senior product manager. Define the problem clearly:\n1. **Problem statement** — one precise sentence\n2. **Who has this problem** — user segments and their specific pain\n3. **Current workarounds** — how users cope today\n4. **Why now** — why is this worth solving now\n5. **Success looks like** — quantifiable outcomes\n6. **Out of scope** — what this will deliberately not solve\n\nIdea: {{feature_idea}}\nContext: {{context}}" +prompt_template = """ +You are a senior product manager. Define the problem clearly: +1. **Problem statement** — one precise sentence +2. **Who has this problem** — user segments and their specific pain +3. **Current workarounds** — how users cope today +4. **Why now** — why is this worth solving now +5. **Success looks like** — quantifiable outcomes +6. **Out of scope** — what this will deliberately not solve + +Idea: {{feature_idea}} +Context: {{context}} +""" [[steps]] name = "user_stories" -prompt_template = "Write user stories in the format: As a [user type], I want to [action] so that [outcome].\n\nFor each story:\n- Given / When / Then acceptance criteria (3-5 criteria)\n- Priority: P0 (must-have) / P1 (should-have) / P2 (nice-to-have)\n- Estimated complexity: S / M / L / XL\n\nWrite at least 6 user stories covering happy paths, edge cases, and error states.\n\nProblem definition:\n{{problem_definition}}" +prompt_template = """ +Write user stories in the format: As a [user type], I want to [action] so that [outcome]. + +For each story: +- Given / When / Then acceptance criteria (3-5 criteria) +- Priority: P0 (must-have) / P1 (should-have) / P2 (nice-to-have) +- Estimated complexity: S / M / L / XL + +Write at least 6 user stories covering happy paths, edge cases, and error states. + +Problem definition: +{{problem_definition}} +""" depends_on = ["problem_definition"] [[steps]] name = "prd" -prompt_template = "Write a complete Product Requirements Document:\n\n## Overview\n## Problem Statement\n## Goals & Non-Goals\n## User Stories\n(from above)\n## Functional Requirements\nNumbered list of specific behaviours the system must exhibit.\n## Non-Functional Requirements\nPerformance, security, accessibility, internationalisation.\n## Technical Considerations\nKnown constraints, integration points, migration needs.\n## Metrics\nHow success will be measured (leading and lagging indicators).\n## Open Questions\nDecisions still needed, with suggested owners.\n## Timeline Sketch\nPhases with rough scope.\n\nProblem definition:\n{{problem_definition}}\n\nUser stories:\n{{user_stories}}" +prompt_template = """ +Write a complete Product Requirements Document: + +## Overview +## Problem Statement +## Goals & Non-Goals +## User Stories +(from above) +## Functional Requirements +Numbered list of specific behaviours the system must exhibit. +## Non-Functional Requirements +Performance, security, accessibility, internationalisation. +## Technical Considerations +Known constraints, integration points, migration needs. +## Metrics +How success will be measured (leading and lagging indicators). +## Open Questions +Decisions still needed, with suggested owners. +## Timeline Sketch +Phases with rough scope. + +Problem definition: +{{problem_definition}} + +User stories: +{{user_stories}} +""" depends_on = ["problem_definition", "user_stories"] diff --git a/workflows/refactor-plan.toml b/workflows/refactor-plan.toml index de9e815..49cb0b0 100644 --- a/workflows/refactor-plan.toml +++ b/workflows/refactor-plan.toml @@ -23,14 +23,59 @@ default = "general code quality improvement" [[steps]] name = "smell_analysis" -prompt_template = "You are a senior software architect performing a code quality audit. Identify all code smells and issues:\n\nFor each issue found:\n- Category: naming / duplication / complexity / coupling / abstraction / performance / security\n- Severity: critical / high / medium / low\n- Location: function/class name\n- Description: what is wrong\n- Impact: why it matters\n\nContext: {{context}}\n\nCode:\n{{code}}" +prompt_template = """ +You are a senior software architect performing a code quality audit. Identify all code smells and issues: + +For each issue found: +- Category: naming / duplication / complexity / coupling / abstraction / performance / security +- Severity: critical / high / medium / low +- Location: function/class name +- Description: what is wrong +- Impact: why it matters + +Context: {{context}} + +Code: +{{code}} +""" [[steps]] name = "prioritised_opportunities" -prompt_template = "Prioritise refactoring opportunities by: (impact × risk_reduction) / effort.\n\nFor the top 5 opportunities:\n- What to change\n- Expected benefit\n- Estimated effort: hours\n- Risk level: low / medium / high\n- Prerequisites: what must be done first\n- Whether tests are needed before refactoring\n\nSmell analysis:\n{{smell_analysis}}" +prompt_template = """ +Prioritise refactoring opportunities by: (impact × risk_reduction) / effort. + +For the top 5 opportunities: +- What to change +- Expected benefit +- Estimated effort: hours +- Risk level: low / medium / high +- Prerequisites: what must be done first +- Whether tests are needed before refactoring + +Smell analysis: +{{smell_analysis}} +""" depends_on = ["smell_analysis"] [[steps]] name = "migration_plan" -prompt_template = "Design an incremental refactoring plan that keeps the system working throughout:\n\n**Phase 1 — Safety net** (tests and coverage)\n**Phase 2 — Low-risk quick wins**\n**Phase 3 — Structural changes**\n**Phase 4 — Validation and cleanup**\n\nFor each phase:\n- Specific changes in order\n- How to verify nothing broke after each change\n- Rollback strategy\n- Definition of done\n\nAlso note: what NOT to change in this refactoring cycle.\n\nPrioritised opportunities:\n{{prioritised_opportunities}}" +prompt_template = """ +Design an incremental refactoring plan that keeps the system working throughout: + +**Phase 1 — Safety net** (tests and coverage) +**Phase 2 — Low-risk quick wins** +**Phase 3 — Structural changes** +**Phase 4 — Validation and cleanup** + +For each phase: +- Specific changes in order +- How to verify nothing broke after each change +- Rollback strategy +- Definition of done + +Also note: what NOT to change in this refactoring cycle. + +Prioritised opportunities: +{{prioritised_opportunities}} +""" depends_on = ["prioritised_opportunities"] diff --git a/workflows/research.toml b/workflows/research.toml index ccc11da..0bd232c 100644 --- a/workflows/research.toml +++ b/workflows/research.toml @@ -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"] diff --git a/workflows/test-generation.toml b/workflows/test-generation.toml index e918064..97c1cef 100644 --- a/workflows/test-generation.toml +++ b/workflows/test-generation.toml @@ -23,14 +23,50 @@ default = "auto-detect" [[steps]] name = "code_analysis" -prompt_template = "Analyse the following {{language}} code as a QA engineer:\n1. List every public function/method and its contract (inputs → outputs)\n2. Identify all branches and conditional paths\n3. Note external dependencies that need mocking\n4. Flag complex logic most likely to contain bugs\n5. List data types and their valid/invalid ranges\n\nCode:\n{{code}}" +prompt_template = """ +Analyse the following {{language}} code as a QA engineer: +1. List every public function/method and its contract (inputs → outputs) +2. Identify all branches and conditional paths +3. Note external dependencies that need mocking +4. Flag complex logic most likely to contain bugs +5. List data types and their valid/invalid ranges + +Code: +{{code}} +""" [[steps]] name = "edge_cases" -prompt_template = "Based on the code analysis, enumerate all edge cases and boundary conditions:\n- Null/empty/zero inputs\n- Maximum/minimum values\n- Concurrent access scenarios\n- Error propagation paths\n- State machine transitions\n- External dependency failures\n\nCode analysis:\n{{code_analysis}}" +prompt_template = """ +Based on the code analysis, enumerate all edge cases and boundary conditions: +- Null/empty/zero inputs +- Maximum/minimum values +- Concurrent access scenarios +- Error propagation paths +- State machine transitions +- External dependency failures + +Code analysis: +{{code_analysis}} +""" depends_on = ["code_analysis"] [[steps]] name = "test_suite" -prompt_template = "Write a complete test suite in {{language}} covering:\n1. **Happy path tests** — one per public function\n2. **Edge case tests** — from the edge case list\n3. **Error handling tests** — each error path\n4. **Integration tests** — cross-component interactions\n\nUse descriptive test names following the pattern: `test___`.\nInclude setup/teardown where needed. Add a comment explaining the intent of non-obvious tests.\n\nCode:\n{{code}}\n\nEdge cases:\n{{edge_cases}}" +prompt_template = """ +Write a complete test suite in {{language}} covering: +1. **Happy path tests** — one per public function +2. **Edge case tests** — from the edge case list +3. **Error handling tests** — each error path +4. **Integration tests** — cross-component interactions + +Use descriptive test names following the pattern: `test___`. +Include setup/teardown where needed. Add a comment explaining the intent of non-obvious tests. + +Code: +{{code}} + +Edge cases: +{{edge_cases}} +""" depends_on = ["code_analysis", "edge_cases"] diff --git a/workflows/translate-polish.toml b/workflows/translate-polish.toml index 8753694..108de02 100644 --- a/workflows/translate-polish.toml +++ b/workflows/translate-polish.toml @@ -30,14 +30,52 @@ default = "match source" [[steps]] name = "translate" -prompt_template = "You are a professional translator. Translate the following text into {{target_language}}.\n\nGuidelines:\n- Preserve the original meaning, tone, and structure as closely as the target language allows\n- Use {{register}} register\n- For idiomatic expressions, translate the meaning rather than word-for-word\n- For proper nouns and technical terms, keep the original with a parenthetical explanation on first use if needed\n- If any passage is ambiguous in the source, note the ambiguity briefly after the translation\n\nSource text:\n{{source_text}}" +prompt_template = """ +You are a professional translator. Translate the following text into {{target_language}}. + +Guidelines: +- Preserve the original meaning, tone, and structure as closely as the target language allows +- Use {{register}} register +- For idiomatic expressions, translate the meaning rather than word-for-word +- For proper nouns and technical terms, keep the original with a parenthetical explanation on first use if needed +- If any passage is ambiguous in the source, note the ambiguity briefly after the translation + +Source text: +{{source_text}} +""" [[steps]] name = "back_translate" -prompt_template = "Back-translate the following {{target_language}} translation into the source language. Do not look at the original — produce an independent translation from the target language only.\n\nThis is used to verify accuracy by comparing the back-translation to the original.\n\nTranslation to back-translate:\n{{translate}}" +prompt_template = """ +Back-translate the following {{target_language}} translation into the source language. Do not look at the original — produce an independent translation from the target language only. + +This is used to verify accuracy by comparing the back-translation to the original. + +Translation to back-translate: +{{translate}} +""" depends_on = ["translate"] [[steps]] name = "review_and_polish" -prompt_template = "You are a bilingual editor. Review the translation quality by comparing original, translation, and back-translation.\n\nCheck for:\n1. Meaning shifts — where the back-translation diverges from the original\n2. Unnatural phrasing that sounds translated rather than native\n3. Register consistency (target: {{register}})\n4. Cultural appropriateness for {{target_language}} readers\n\nOutput: the polished final translation only, with a brief note on any changes made.\n\nOriginal:\n{{source_text}}\n\nTranslation:\n{{translate}}\n\nBack-translation:\n{{back_translate}}" +prompt_template = """ +You are a bilingual editor. Review the translation quality by comparing original, translation, and back-translation. + +Check for: +1. Meaning shifts — where the back-translation diverges from the original +2. Unnatural phrasing that sounds translated rather than native +3. Register consistency (target: {{register}}) +4. Cultural appropriateness for {{target_language}} readers + +Output: the polished final translation only, with a brief note on any changes made. + +Original: +{{source_text}} + +Translation: +{{translate}} + +Back-translation: +{{back_translate}} +""" depends_on = ["translate", "back_translate"] diff --git a/workflows/weekly-report.toml b/workflows/weekly-report.toml index 762f1c3..9f58b1b 100644 --- a/workflows/weekly-report.toml +++ b/workflows/weekly-report.toml @@ -30,9 +30,48 @@ default = "manager" [[steps]] name = "extract" -prompt_template = "You are an executive assistant. Parse the following raw work notes and extract every item into structured categories:\n\n**Completed** — fully done tasks (include measurable outcomes if mentioned)\n**In Progress** — work started but not finished (include % complete or next milestone if available)\n**Blockers** — anything preventing progress, and who or what is blocking\n**Decisions Made** — choices or agreements reached this week\n**Metrics** — any numbers mentioned (velocity, usage, revenue, bugs closed, etc.)\n**Upcoming** — planned work mentioned for next week\n\nDo not summarise or rephrase — extract faithfully.\n\nTeam/Role: {{team_or_role}}\n\nRaw notes:\n{{work_notes}}" +prompt_template = """ +You are an executive assistant. Parse the following raw work notes and extract every item into structured categories: + +**Completed** — fully done tasks (include measurable outcomes if mentioned) +**In Progress** — work started but not finished (include % complete or next milestone if available) +**Blockers** — anything preventing progress, and who or what is blocking +**Decisions Made** — choices or agreements reached this week +**Metrics** — any numbers mentioned (velocity, usage, revenue, bugs closed, etc.) +**Upcoming** — planned work mentioned for next week + +Do not summarise or rephrase — extract faithfully. + +Team/Role: {{team_or_role}} + +Raw notes: +{{work_notes}} +""" [[steps]] name = "report_writer" -prompt_template = "Write a polished weekly report for a {{audience}} audience. Tone should be professional and concise — no padding.\n\n## Highlights\nTop 3 achievements this week, each in one sentence with measurable impact where available.\n\n## Progress\nGrouped by project or workstream. For each: what was done, current status, and any dependency.\n\n## Metrics\nKey numbers from the week. If none were provided, omit this section.\n\n## Blockers & Risks\nEach blocker: description, impact, owner, and requested action.\n\n## Next Week\nTop 3-5 priorities with owner and expected outcome.\n\n## Notes\nDecisions made, process changes, or anything the audience should be aware of.\n\nExtracted data:\n{{extract}}" +prompt_template = """ +Write a polished weekly report for a {{audience}} audience. Tone should be professional and concise — no padding. + +## Highlights +Top 3 achievements this week, each in one sentence with measurable impact where available. + +## Progress +Grouped by project or workstream. For each: what was done, current status, and any dependency. + +## Metrics +Key numbers from the week. If none were provided, omit this section. + +## Blockers & Risks +Each blocker: description, impact, owner, and requested action. + +## Next Week +Top 3-5 priorities with owner and expected outcome. + +## Notes +Decisions made, process changes, or anything the audience should be aware of. + +Extracted data: +{{extract}} +""" depends_on = ["extract"] From e177af00a6c604562491cb73363767951f8d0b7f Mon Sep 17 00:00:00 2001 From: Evan Hu Date: Wed, 1 Apr 2026 19:19:33 +0900 Subject: [PATCH 4/4] style(hands): replace \n escape in reddit writer format example with multiline code block --- hands/reddit/HAND.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hands/reddit/HAND.toml b/hands/reddit/HAND.toml index 227b8b3..89de185 100644 --- a/hands/reddit/HAND.toml +++ b/hands/reddit/HAND.toml @@ -836,7 +836,12 @@ Reddit uses a markdown variant. Use these formatting tools appropriately: - Include a TL;DR for any post longer than 150 words - Place it at the END of the post, preceded by a horizontal rule - The TL;DR should be 1-2 sentences that capture the core point -- Format: `---\n\n**TL;DR:** One or two sentence summary.` +- Format: + ``` + --- + + **TL;DR:** One or two sentence summary. + ``` ## POST TYPE ROTATION