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.
27 lines
810 B
Go
27 lines
810 B
Go
package recipe
|
|
|
|
type Recipe struct {
|
|
Name string `yaml:"name"`
|
|
Description string `yaml:"description"`
|
|
Version string `yaml:"version"`
|
|
Parameters map[string]Parameter `yaml:"parameters"`
|
|
AllowedShellCommands []string `yaml:"allowed_shell_commands"`
|
|
Overview string `yaml:"-"` // extracted from markdown
|
|
Steps []Step `yaml:"-"`
|
|
FinalSummaryPrompt string `yaml:"-"`
|
|
}
|
|
|
|
type Parameter struct {
|
|
Type string `yaml:"type"`
|
|
Default any `yaml:"default"`
|
|
Description string `yaml:"description"`
|
|
}
|
|
|
|
type Step struct {
|
|
Number int
|
|
Title string
|
|
Objective string
|
|
Instructions string
|
|
Expected string
|
|
}
|