dsh-ralph-loop
Run the following command in DeepSeek Harness:
dsh plugin install zerosloney/dsh-ralph-loop
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install zerosloney/dsh-ralph-loop in your terminal to install; the source repository is https://github.com/zerosloney/dsh-ralph-loop
About this plugin
Conventional ReAct loops send an LLM into a blind think-act thrash: errors oscillate, no experience is retained, and the token budget is burned long before a reliable result appears. dsh-ralph-loop replaces that pattern with a five-stage state machine—Reflect, Assess, Learn, Plan, Handle—where every cycle has explicit reflection, evaluation, learning, planning, and execution nodes. Immutable state snapshots and a hard maxCycles ceiling keep the loop deterministic and bounded.
Three pillars carry the core value. First, sandboxed test verification: test commands run inside the Harness Sandbox with fail-closed semantics, so a missing or partial sandbox never lets an unconfined process escape. Second, cross-run lesson persistence: scoped by a lessonKey (hashed to a file name, so no path traversal), accumulated lessons are re-injected into the Plan prompt on the next run, ensuring the same failure does not recur. Third, best-effort return and checkpoint recovery: on failure the engine hands back the closest-to-passing round rather than nothing, and an aborted run can resume from its atomic snapshot with the same parameters. The full ralph/* event stream feeds Trajectory replay, and an optional applyBack writes final files into an operator-designated directory.
It is built for developers driving autonomous code generation inside DeepSeek Harness who need a repeatable loop: generate, test, diagnose, fix—observable, recoverable, and compounding its own experience across runs.
Use Cases
- Drive an LLM to generate code and iterate against tests in an isolated sandbox until they pass
- Accumulate lessons across runs so the same failure is not repeated
- Resume from a checkpoint after an abort without losing prior progress
Best For
- Developers driving autonomous code generation inside DeepSeek Harness
- Teams needing observable, recoverable, experience-accumulating automation workflows
- Users seeking a deterministic self-healing loop to replace blind ReAct thrash
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.