Beyond Single Loops: Open-Source Tool 'Peter' Restructures Coding Agents with Dual-Graph Architecture

BaXRS1988 · reddit · 2026-08-13

Addressing the debate of "loops vs. graphs" in AI agent design, a developer open-sourced Peter, an MIT-licensed Claude Code skill. The tool separates agent architecture into a Role graph (parent orchestrator, scoped builders, independent auditors) and a Work graph (persistent JSONL tasks tracking dependencies, status, and commits).

Loops still exist but are contained within graph nodes (implement → gates → audit → repair). The graph handles dependency ordering, context persistence, and explicit terminal states. In its launch run, the system passed 33/33 tests and 9/9 E2E checks with zero manual intervention.

The author also measured token efficiency: the ESON format reduced tokens by 28% compared to compact JSON with lossless round trips. The Honey benchmark reduced output by 29% and LOC by 43%. However, the author notes a lack of controlled runs means end-to-end dollar savings remain unproven.

Original post →

More from coding & agent

coding & agent channel →