feature/recipe_implementation #5

Merged
gmgauthier merged 54 commits from feature/recipe_implementation into master 2026-03-07 23:17:54 +00:00
2 changed files with 15 additions and 3 deletions
Showing only changes of commit 3d9d1cd722 - Show all commits

View File

@ -39,12 +39,17 @@ Refactors all error handling in the target package to use the new Result[T] patt
## Execution Steps ## Execution Steps
### Step 1: Discover files ### Step 1: Explore project structure
**Objective:** Get a clear view of the current project layout.
**Instructions:** Use safe read-only shell commands to show the directory tree and key files.
**Expected output:** A tree view and relevant file contents.
### Step 2: Discover files
**Objective:** Find every file that needs changing. **Objective:** Find every file that needs changing.
**Instructions:** Recursively scan `{{.package_path}}` for `.go` files containing `if err != nil`. **Instructions:** Recursively scan `{{.package_path}}` for `.go` files containing `if err != nil`.
**Expected output:** A clean list of full file paths (one per line). If none, say "No files found matching the criteria." **Expected output:** A clean list of full file paths (one per line). If none, say "No files found matching the criteria."
### Step 2: Refactor each file ### Step 3: Refactor each file
**Objective:** Generate the updated code. **Objective:** Generate the updated code.
**Instructions:** For each file from Step 1: **Instructions:** For each file from Step 1:
- Read the full original content. - Read the full original content.
@ -59,7 +64,7 @@ Refactors all error handling in the target package to use the new Result[T] patt
] ]
``` ```
### Step 3: Apply or patch ### Step 4: Apply or patch
**Objective:** **Objective:**
Safely write changes or create reviewable output. Safely write changes or create reviewable output.
**Instructions:** **Instructions:**

View File

@ -49,6 +49,13 @@ func (r *Runner) Run() error {
r.handleApplyStep(refactorJSONs) r.handleApplyStep(refactorJSONs)
continue continue
// NEW: Read-only shell commands (ls, cat, tree, git status, etc.)
case strings.Contains(titleLower, "read-only") || strings.Contains(titleLower, "inspect") ||
strings.Contains(titleLower, "explore") || strings.Contains(titleLower, "shell") ||
strings.Contains(titleLower, "show") || strings.Contains(titleLower, "list"):
r.executeReadOnlyShell(step, previousResults)
continue
default: default:
prompt := fmt.Sprintf(`Recipe Overview: prompt := fmt.Sprintf(`Recipe Overview:
%s %s