self-healing
Automatically diagnose and repair issues.
Protocol
- Analyze Error: Capture full stdout/stderr of the failing command.
- Context Retrieval: Use
grepor LSP to find the relevant code mentioned in the trace. - Hypothesis: Identify the root cause (e.g., syntax error, missing dependency, logic bug).
- Fix Execution: Apply the minimal fix using
editorsed. - Verification: Re-run the command that failed.
- Iteration: If it fails again, repeat from step 1 with the new error.
Best Practices
- Silent Fixes: Do not explain why it failed unless asked. Just fix it.
- Dependency Check: If a module is missing, install it immediately.
- Regression Guard: After fixing, run all related tests to ensure no new bugs.