fix(formula): Convert code-review.formula.toml from Handlebars to Go template syntax

The convoy formula's base prompt was using Handlebars syntax ({{#if}}, {{#each}},
{{this.field}}) but Go's text/template uses different syntax ({{if .}}, {{range .}},
{{.field}}).

Changes:
- {{variable}} → {{.variable}} (dot prefix for variable access)
- {{#if var}} → {{if .var}}
- {{#each items}} → {{range .items}}
- {{this.field}} → {{.field}}
- {{/if}}, {{/each}} → {{end}}

Also added a comment noting the template uses Go text/template syntax.

Fixes: gt-2dndm

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
valkyrie
2026-01-01 17:31:28 -08:00
committed by Steve Yegge
parent db2b25d789
commit d2ec9ff8cd
+22 -21
View File
@@ -51,6 +51,7 @@ type = "string"
required_unless = ["pr", "files"] required_unless = ["pr", "files"]
# Base prompt template - injected into all leg prompts # Base prompt template - injected into all leg prompts
# NOTE: Uses Go text/template syntax (not Handlebars)
[prompts] [prompts]
base = """ base = """
# Code Review Assignment # Code Review Assignment
@@ -58,34 +59,34 @@ base = """
You are a specialized code reviewer participating in a convoy review. You are a specialized code reviewer participating in a convoy review.
## Context ## Context
- **Formula**: {{formula_name}} - **Formula**: {{.formula_name}}
- **Review target**: {{target_description}} - **Review target**: {{.target_description}}
- **Your focus**: {{leg.focus}} - **Your focus**: {{.leg.focus}}
- **Leg ID**: {{leg.id}} - **Leg ID**: {{.leg.id}}
## Files Under Review ## Files Under Review
{{#if pr_number}} {{if .pr_number -}}
PR #{{pr_number}}: {{pr_title}} PR #{{.pr_number}}: {{.pr_title}}
Changed files: Changed files:
{{#each changed_files}} {{range .changed_files -}}
- {{this.path}} (+{{this.additions}}/-{{this.deletions}}) - {{.path}} (+{{.additions}}/-{{.deletions}})
{{/each}} {{end -}}
{{else}} {{else -}}
{{#each files}} {{range .files -}}
- {{this}} - {{.}}
{{/each}} {{end -}}
{{/if}} {{end}}
## Your Task ## Your Task
{{leg.description}} {{.leg.description}}
## Output Requirements ## Output Requirements
Write your findings to: **{{output_path}}** Write your findings to: **{{.output_path}}**
Structure your output as follows: Structure your output as follows:
```markdown ```markdown
# {{leg.title}} Review # {{.leg.title}} Review
## Summary ## Summary
(1-2 paragraph overview of findings) (1-2 paragraph overview of findings)
@@ -114,8 +115,8 @@ Use specific file:line references. Be actionable. Prioritize impact.
# Output configuration # Output configuration
[output] [output]
directory = ".reviews/{{review_id}}" directory = ".reviews/{{.review_id}}"
leg_pattern = "{{leg.id}}-findings.md" leg_pattern = "{{.leg.id}}-findings.md"
synthesis = "review-summary.md" synthesis = "review-summary.md"
# Leg definitions - each spawns a parallel polecat # Leg definitions - each spawns a parallel polecat
@@ -299,10 +300,10 @@ description = """
Combine all leg findings into a unified, prioritized review. Combine all leg findings into a unified, prioritized review.
**Your input:** **Your input:**
All leg findings from: {{output.directory}}/ All leg findings from: {{.output.directory}}/
**Your output:** **Your output:**
A synthesized review at: {{output.directory}}/{{output.synthesis}} A synthesized review at: {{.output.directory}}/{{.output.synthesis}}
**Structure:** **Structure:**
1. **Executive Summary** - Overall assessment, merge recommendation 1. **Executive Summary** - Overall assessment, merge recommendation