- Added new template-recipe.md with structure for creating recipes. - Changed "**Final Summary**" to "### Final Summary" in result-refactor.md for better formatting.
1.8 KiB
1.8 KiB
| name | description | version | parameters | project_languages | extensions | search_pattern | allowed_shell_commands | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| my-awesome-recipe | Short description of what this recipe does | 1.0 |
|
|
|
if err != nil |
|
My Awesome Recipe
Overview
One-sentence summary of what the whole recipe accomplishes.
Execution Steps
Step 1: Discover files
Objective: Find every file that needs changing.
Instructions: Recursively scan {{.package_path}} for files containing the search pattern.
Expected output: A clean list of full file paths (one per line). If none, say "No files found matching the criteria."
Step 2: Do the work
Objective: Perform the main task on each discovered file.
Instructions: For each file from Step 1:
- Read the full original content.
- Do whatever transformation is needed.
- Return ONLY this exact JSON (no extra text, no markdown):
{
"file": "path/to/file.ext",
"content": "the complete new file content here"
}
Expected output: A JSON array containing one object per file.
Step 3: Apply or patch
Objective: Safely write changes or create reviewable output. Instructions:
- If dry_run is true → create a unified diff patch file for review.
- If false → write the new files (backup originals as .bak).
- Expected output: Confirmation of what was written + full path to any patch file.
Final Summary
Give me a concise executive summary: number of files changed, any warnings or patterns you noticed, and your recommended next step.