Enhance discoverFiles to respect explicit package_path param if provided.
If no param is given, intelligently default to 'src' directory if it exists,
otherwise fall back to project root (.).
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.
- Build allowed extensions from recipe languages and extensions map
- Generalize filepath walking to filter by allowed extensions instead of hardcoding .go
- Retain Go-specific content check for now; can generalize later
- Simplify refactor JSON handling and patch creation by removing redundant comments and error checks
- Adjust comments and minor formatting for clarity
- Introduce refactorJSONs to collect pure JSON from refactor steps for apply.
- Update discoverFiles to respect recipe's package_path parameter.
- Refine handleApplyStep to parse and apply changes more robustly.
- Remove outdated test output files.
Add refactorFiles to process discovered files individually, generating small JSON responses per file to avoid truncation. Update handleApplyStep to collect and parse multiple single-file JSONs into a unified patch. Switch discoverFiles comment to reflect real scanning. Add fallback default in Run for other steps.
- Blank import bufio to avoid unused warnings.
- Refine regex to handle double-quoted format and fix backtick issues.
- Update comments for clarity on regex changes.
Adjust the regex in handleApplyStep to flexibly match both old and new Grok formats for code blocks. Also, remove blank import for bufio as it's now used.
- Update discoverFiles comment to be more concise.
- Enhance blockRe regex to optionally match leading "// " for filenames, supporting varied Grok output formats.
- Revise handleApplyStep comment to reflect regex changes.
- Simplify createUnifiedPatch by removing unnecessary error checks on fmt.Fprintf and defer closure.
- Adjust bufio import to blank (likely for side effects or pending use)
- Refine comments for clarity and remove unnecessary ones
- Split regex string to avoid backtick collisions in literals
- Add error handling to patch writing in createUnifiedPatch
- Minor formatting and defer close adjustments
- Introduce discoverFiles function to scan Go files in 'internal' for error handling patterns.
- Add special case for "discover" or "find" steps to perform filesystem scans.
- Refine LLM prompting to enforce strict output format and shorten system prompt.
- Update apply/patch handling and unified patch creation with simplifications.
- Import bufio for potential future use and adjust regex for code block extraction.
- Restrict filesystem interactions to apply/patch steps exclusively.
- Remove real apply logic with user confirmation; default to creating a patch file in dry-run mode.
- Update prompts, comments, and regex for better clarity and precision.
- Add unit tests for the extractCodeBlocks function to ensure reliable parsing.
- Introduce special case in Runner.Run() for steps containing "apply" or "patch" in title.
- Add handleApplyStep to parse code blocks from previous results, support dry-run patch creation, or real application with user confirmation and backups.
- Implement extractCodeBlocks using regex to identify labelled Go code blocks.
- Add createUnifiedPatch for generating unified diff patches in dry-run mode.
- Remove final summary prompt and streamline recipe completion.
- Adjust system prompt for clarity.
- Enhance recipe parsing in loader.go: extract overview, use split-based step extraction to avoid duplicates, refine final summary handling, and clean up comments/templates.
- Refine runner.go prompts: add Grok system message, simplify user prompts for conciseness, adjust result joining with separators, and remove unnecessary text.
Add support for executing recipe steps via Grok API streaming, including parameter defaults from YAML, model selection via flags/config, previous step context, and a final summary prompt. Update runner to handle client and model, and refine loader to apply user params with fallbacks.
- Simplify import comments and error handling in cmd/recipe.go
- Streamline regex comment in internal/recipe/loader.go
- Enhance console output and add LLM placeholder in internal/recipe/runner.go