feat(workflows): expand template library from 9 to 22 + multiline string cleanup (#36)
* feat(workflows): add 13 workflow templates across engineering, business, and productivity Engineering: - bug-triage: reproduce path → root cause → fix plan - api-design: resource model → endpoints → OpenAPI spec - incident-postmortem: timeline → RCA → full postmortem report - test-generation: code analysis → edge cases → full test suite - refactor-plan: smell analysis → prioritised opportunities → migration plan Business: - competitor-analysis: profiles → SWOT → strategy report - product-spec: problem definition → user stories → full PRD - market-research: landscape → segments → research report Productivity/Thinking: - meeting-summary: raw notes → structured summary → follow-up email - decision-matrix: criteria → weighted scoring → recommendation memo - learning-plan: gap analysis → roadmap → week-1 day-by-day plan - job-application: job analysis → tailored resume → cover letter → interview prep - blog-post: research → outline → draft → SEO optimisation Closes #1912 on librefang/librefang * fix(workflows): overhaul existing 9 templates - data-pipeline: redesigned — original 'extract from URL' step was broken (LLMs cannot fetch URLs); replaced with paste-data approach (profile → clean_transform → analyse) with analysis_goal parameter - translate-polish: added target_language and register parameters; added back-translation step for accuracy verification - weekly-report: added team/audience parameters, richer extraction step, added Metrics and Notes sections - content-pipeline: added audience/tone parameters, added outline step between research and writing - content-review: fix category 'content' → 'creation' - customer-support: fix category 'support' → 'business' * style(workflows): convert all prompt_template strings to TOML multiline syntax Replace \n escape sequences with real newlines using triple-quote multiline strings ("""...""") across all 22 workflow templates. No content changes — formatting only. * style(hands): replace \n escape in reddit writer format example with multiline code block
This commit is contained in:
23 files changed
+1500
-64
No files matched your search
@@ -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"]
|
||||
Reference in new issue
Block a user