Summary
Replace console.log/ad-hoc logging with pinojs/pino (17k+ stars) for structured JSON logging across the agent.
Motivation
Debugging autonomous RALPH loops is difficult without structured, queryable logs. Currently src/monitor.ts handles logging but a proper structured logger would make it easy to trace message lifecycles, Claude CLI invocations, self-edits, and errors with consistent format and log levels.
Proposal
- Add
pino as a dependency (super fast, minimal overhead)
- Replace console.log calls with leveled pino loggers (info, warn, error, debug)
- Log key events: RALPH step start/end, Claude CLI invocation timing/tokens, queue operations, webhook events
- Output as JSON for easy parsing/querying, with pretty-print option for dev
References
Summary
Replace console.log/ad-hoc logging with pinojs/pino (17k+ stars) for structured JSON logging across the agent.
Motivation
Debugging autonomous RALPH loops is difficult without structured, queryable logs. Currently
src/monitor.tshandles logging but a proper structured logger would make it easy to trace message lifecycles, Claude CLI invocations, self-edits, and errors with consistent format and log levels.Proposal
pinoas a dependency (super fast, minimal overhead)References