feature/recipe_implementation #5
@ -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:**
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user