Self healing, I try two ways:
1) use a memory tool to store learnings for next iteration (Deja.coey.dev) and have the loop system instructions tell how to use it. One orchestrator, and sequential worker agents who run til their context is full and then hand off to the next run with learnings
2) the agent Shelley on exe can search past convos when promoted too for continuation.
I’ve been doing this with great success just “falling” into the implementation after proper guardrails are placed
The purely code part you described is a bit of an "extra steps" -you can just... vscode open target repo, "claude what does this do, how does it do it, spec it out for me" then paste into claude code for your repo "okay claude implement this". This sidesteps the security issue, the deadly trifecta, and the accumulation of unused cruft.