Skip to content

Multi-Agent Ralph Loop

github.com/alfredolopez80/multi-agent-ralph-loop

Autonomous orchestration framework for Claude Code with MemPalace-inspired memory (4-layer L0-L3 stack), 818-token “wake-up” context, parallel-first Agent Teams (6 teammates), Aristotle First Principles methodology, 4-stage quality gates, 22 lifecycle hooks, 925+ tests.

  • L0: hot context this turn
  • L1: session state
  • L2: mission knowledge
  • L3: cross-mission Obsidian-style knowledge graph
  • 4-layer memory model. Borrowed verbatim. Our equivalent: L0 runtime context, L1 raw.md, L2 summary.md/MEMORY.md, L4 (we kept the cross-mission layer at L4 to leave room) identity/<role>.md.
  • Lifecycle hooks pattern. They have 22; we have 12. Different events but same structural idea.
  • Obsidian vault knowledge graph. Markdown files in directories work fine. The graph format adds complexity without payoff at our scale.
  • Aristotle First Principles methodology. We didn’t adopt the explicit framing. Decisions are tracked in decisions/log.md directly.
  • 818-token “wake-up” hard cap. We have a 800-token cap on summary.md (close enough) but no special “wake-up” file.
Ralph LoopPapercup
Obsidian-style cross-mission graphPer-role flat markdown files
Aristotle First Principles framingDecision log without framing layer
22 lifecycle hooks12 lifecycle hooks
6 fixed teammates13 customisable role prompts

The 4-layer memory model is one of the genuinely original ideas in the ecosystem. We adopted it. The Obsidian/graph layer is more ceremony than we wanted but the pattern is sound — if you have hundreds of missions and need cross-link discoverability, the graph format pays off.