pi-ralph — Summary
pi-ralph (samfoy/pi-ralph) is a TypeScript extension for the pi coding agent that adds hat-based multi-agent orchestration loops. Roles are defined as "hats" in YAML preset files — each hat has a name, description, trigger events, published events, and instructions injected into the system prompt when active. Hats hand off work via an event protocol: when a hat publishes an event (>>> EVENT: event_name), the loop transitions to the hat triggered by that event. Preset files are loaded from three locations (built-in, user, project-specific), allowing override without forking. Six presets ship out of the box: feature, code-assist, spec-driven, debug, refactor, review. A PDD (Prompt-Driven Development) planning mode (/plan) produces structured specs in specs/<task-name>/. Guard rails (max iterations, max runtime, completion promise) prevent runaway loops. The extension integrates with pi-slack-bot for Slack-driven orchestration. Compared to seeds, pi-ralph is closest to spec-driver's sequential skill chain but implemented as a YAML-configurable hat system within a pi extension, rather than a static skill pack — the YAML presets allow workflow customization without modifying source code, which no seed framework provides.