grokkit/internal/recipe/runner.go
Greg Gauthier aa38e92fb5 feat(recipe): add recipe system for Result[T] refactoring
Implement recipe loading, parsing, and running infrastructure.
Add initial result-refactor recipe for converting Go error handling to monadic Result[T] style.
Includes markdown recipe definition, YAML frontmatter parsing, step extraction, and basic runner.
2026-03-06 18:35:58 +00:00

23 lines
527 B
Go

package recipe
import "fmt"
type Runner struct {
Recipe *Recipe
}
func NewRunner(r *Recipe) *Runner {
return &Runner{Recipe: r}
}
func (r *Runner) Run() error {
fmt.Printf("🍳 Starting recipe: %s v%s\n", r.Recipe.Name, r.Recipe.Version)
for _, step := range r.Recipe.Steps {
fmt.Printf("Step %d/%d: %s\n", step.Number, len(r.Recipe.Steps), step.Title)
// TODO: here we will send step.Instructions to the LLM
// and handle the response according to Expected
}
fmt.Println("✅ Recipe complete.")
return nil
}