Introduce ResolvedParams field to Recipe struct for storing resolved parameter values from defaults and user overrides. Update loader to populate and use it for template rendering. Adjust runner to use ResolvedParams for root path and generalize file discovery.
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
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"`
|
|
|
|
// Generic discovery support (option 2)
|
|
ProjectLanguages []string `yaml:"project_languages"`
|
|
Extensions map[string][]string `yaml:"extensions"`
|
|
|
|
// Resolved runtime values from --param flags
|
|
ResolvedParams map[string]any `yaml:"-"`
|
|
|
|
// Internal fields populated by loader
|
|
Overview string `yaml:"-"`
|
|
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
|
|
}
|