Agent Self-Debugger Loop

A Python CLI (self_debug.py) that parses pytest stderr/stdout tracebacks, extracts the failing File x.py line N location, reads and rewrites that file via an ast.NodeTransformer to inject sys._getframe()-based log probes and None/missing-attribute guards, re-runs pytest up to 4 attempts, and rolls back via git stash on exhaustion. Pure stdlib (ast, re, subprocess, tempfile, pathlib) plus pytest.

RMAzrim Updated

File contents

RMAzrim/opencode-artes/tree/main/docs/skills/agent-self-debugger-loop commit a13d4e70a5

Frequently asked questions

npx skillmds@latest add rmazrim/agent-self-debugger-loop