OpenClaw program-building
Repair vs rebuild for generated tools
Use this page when a generated helper already works for its core job and you need to improve it without breaking the baseline.
Default ruleIf the tool already does the core job, prefer targeted repair over rebuild.
Why repair first
What targeted repair preserves
- Known-good behavior
- Faster verification
- Smaller change scope
- Clearer blame when something breaks
Warning signs
When repair is drifting into rebuild
- “While we’re here, let’s redesign...”
- Unrelated files or flows changing
- Replacing the whole tool for a narrow defect
- Dropping verification of the old baseline
Good repair prompt
What to ask for
Name the existing tool path, preserve the current working behavior, fix only the exact defect, and verify both the original baseline and the repaired path.