(workflow) add simple harness workflow for manual testing

This commit is contained in:
Test
2026-08-21 18:07:12 -07:00
parent 769e56d33d
commit 5b8d3df01e
17 changed files with 1080 additions and 44 deletions
+26 -1
View File
@@ -1,3 +1,28 @@
package prompts
// Empty stub - will be filled in T0.5
import (
"embed"
"fmt"
"strings"
"text/template"
)
//go:embed planner/default.tmpl judge/default.tmpl implementer/default.tmpl
var templates embed.FS
// Render renders a template with the given variables.
func Render(templateRef string, variables map[string]any) (string, error) {
// Load template from embedded files
tmpl, err := template.ParseFS(templates, templateRef)
if err != nil {
return "", fmt.Errorf("failed to parse template %s: %w", templateRef, err)
}
// Render the template
var result strings.Builder
if err := tmpl.Execute(&result, variables); err != nil {
return "", fmt.Errorf("failed to render template %s: %w", templateRef, err)
}
return result.String(), nil
}