grokkit/internal/recipe/types.go
Greg Gauthier 757f422765 refactor(recipe): make search pattern configurable in file discovery
- Add SearchPattern field to Recipe struct
- Update discoverFiles to use configurable search pattern, defaulting to "if err != nil"
- Set default search_pattern in result-refactor.md recipe
2026-03-07 00:34:25 +00:00

37 lines
1.1 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"`
SearchPattern string `yaml:"search_pattern"` // new
// 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
}