Skip to main content

FAN_OUT

Constant FAN_OUT 

Source
pub const FAN_OUT: &str = "# Pull Request Review\n#\n# Fan-out / gather pattern: three reviewers analyze a PR in parallel from\n# different angles, then a synthesizer combines their findings into one report.\n#\n# Usage:\n#   zig run pr-review \"Review the changes in the auth module refactor\"\n\n[workflow]\nname = \"pr-review\"\ndescription = \"Multi-perspective code review with parallel analysis and synthesis\"\ntags = [\"review\", \"code-quality\", \"fan-out\"]\nversion = \"1.0.0\"\nmemory = \"all\"\n\n[storage.reports]\ntype = \"folder\"\npath = \"./reports\"\ndescription = \"Review reports from each analysis perspective\"\n\n[vars.context]\ntype = \"string\"\nfrom = \"prompt\"\nrequired = true\ndescription = \"Description of the PR or area to review\"\n\n# \u{2500}\u{2500} Steps \u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\u{2500}\n\n[[step]]\nname = \"security-review\"\nprompt = \"\"\"Review the current uncommitted changes for security issues.\n\nContext: ${context}\n\nFocus on:\n- Authentication and authorization flaws\n- Input validation and sanitization gaps\n- Secrets or credentials in code\n- SQL injection, XSS, and command injection vectors\n- Insecure dependencies or configurations\n\nRate severity of each finding as critical, high, medium, or low.\"\"\"\nsystem_prompt = \"You are a senior application security engineer specializing in secure code review.\"\nauto_approve = true\nresources = [\"./security-checklist.md\"]\ndescription = \"Review for security vulnerabilities\"\n\n[[step]]\nname = \"performance-review\"\nprompt = \"\"\"Review the current uncommitted changes for performance issues.\n\nContext: ${context}\n\nFocus on:\n- N+1 query patterns and unnecessary database calls\n- Missing or ineffective caching opportunities\n- Memory allocation hotspots and potential leaks\n- Algorithmic complexity concerns\n- Blocking operations in async contexts\n\nEstimate impact of each finding as high, medium, or low.\"\"\"\nsystem_prompt = \"You are a performance engineer who specializes in identifying bottlenecks and optimization opportunities.\"\nauto_approve = true\ndescription = \"Review for performance concerns\"\n\n[[step]]\nname = \"maintainability-review\"\nprompt = \"\"\"Review the current uncommitted changes for maintainability.\n\nContext: ${context}\n\nFocus on:\n- Code clarity and naming conventions\n- Test coverage gaps for new or changed logic\n- API design and backwards compatibility\n- Error handling completeness\n- Documentation accuracy for public interfaces\n\nRate each finding as must-fix, should-fix, or nice-to-have.\"\"\"\nsystem_prompt = \"You are a staff engineer focused on long-term code health, API design, and developer experience.\"\nauto_approve = true\nresources = [\"./coding-standards.md\"]\ndescription = \"Review for maintainability and code health\"\n\n[[step]]\nname = \"synthesize\"\nprompt = \"\"\"Combine the three review reports into a single structured PR review.\n\nContext: ${context}\n\nProduce a unified report with:\n1. **Executive Summary** \u{2014} one paragraph overall assessment and go/no-go recommendation\n2. **Critical Findings** \u{2014} items that must be fixed before merge (from any reviewer)\n3. **Recommendations** \u{2014} items that should be addressed but are not blocking\n4. **Observations** \u{2014} nice-to-have improvements for future work\n5. **Verdict** \u{2014} APPROVE, REQUEST_CHANGES, or NEEDS_DISCUSSION\n\nDe-duplicate overlapping findings. When reviewers disagree, note the tension.\"\"\"\ndepends_on = [\"security-review\", \"performance-review\", \"maintainability-review\"]\ninject_context = true\nsystem_prompt = \"You are a tech lead synthesizing feedback from multiple expert reviewers into a clear, actionable review.\"\nstorage = [\"reports\"]\nmemory = \"none\"\ndescription = \"Combine all review findings into a unified report\"\n";