From f36722ad2cb0e041d69a04fab3a0e3138f005b0c Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sat, 7 Mar 2026 00:53:38 +0000 Subject: [PATCH] feat(recipes): add template recipe and update final summary heading - Added new template-recipe.md with structure for creating recipes. - Changed "**Final Summary**" to "### Final Summary" in result-refactor.md for better formatting. --- .grokkit/recipes/result-refactor.md | 2 +- .grokkit/recipes/template-recipe.md | 67 +++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .grokkit/recipes/template-recipe.md diff --git a/.grokkit/recipes/result-refactor.md b/.grokkit/recipes/result-refactor.md index 90a8fdb..427d5d9 100644 --- a/.grokkit/recipes/result-refactor.md +++ b/.grokkit/recipes/result-refactor.md @@ -67,5 +67,5 @@ Safely write changes or create reviewable output. - 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** +### Final Summary Give me a concise executive summary: number of files changed, any warnings or patterns you noticed, and your recommended next step. \ No newline at end of file diff --git a/.grokkit/recipes/template-recipe.md b/.grokkit/recipes/template-recipe.md new file mode 100644 index 0000000..db9448b --- /dev/null +++ b/.grokkit/recipes/template-recipe.md @@ -0,0 +1,67 @@ +--- +name: my-awesome-recipe +description: Short description of what this recipe does +version: 1.0 + +parameters: + package_path: + type: string + default: internal + description: Directory or package to operate on + dry_run: + type: bool + default: true + description: If true, only generate a patch + +project_languages: + - go + +extensions: + go: + - .go + +search_pattern: "if err != nil" + +allowed_shell_commands: + - go test ./... + - go fmt ./... + - go vet ./... + +--- + +# 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): + +```json +{ + "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. \ No newline at end of file