The Problem

Developers need a repeatable loop that turns predictions from a world‑model into real improvements. Existing tools either stop at a single “generate‑evaluate” cycle or require domain‑specific plumbing. RSI‑Anything offers a unified workflow that can be plugged into code repair, GUI automation, lab planning, and more, without rewriting the selection and learning logic for each domain.

What This Does

The core library lives in src/rsi_anything.

  • __main__.py launches the package as a CLI.
  • cli.py exposes a click command set that delegates to domain modules.
  • workflow/ implements the generic Propose → Predict → Select → Evaluate → Learn → Retain cycle and is exercised by the domain tasks in src/rsi_anything/tasks.

Domain‑specific logic is separated into subpackages:

  • tasks/code_repair – candidate generation, execution simulation, and test‑based feedback.
  • tasks/gui – MiniWoB++ interactions, UI state serialization, and browser automation.

Both use the same workflow.runner to orchestrate their steps. The GUI entry point is tasks/gui/src/rsi_anything_gui/__main__.py, which loads a bundled MiniWoB HTML bundle from tasks/gui/src/rsi_anything_gui/assets/miniwob_html.

How It Is Wired

  1. Entry – python -m rsi_anything imports src/rsi_anything/__main__.py.
  2. __main__ calls cli.main(), defined in src/rsi_anything/cli.py.
  3. cli parses a subcommand (e.g., code-repair or gui) and imports the corresponding task module.
  4. The task module calls workflow.runner.run(task_config).
  5. runner reads a JSON config from configs (e.g., configs/code_repair/default.json) and constructs a Workflow instance (workflow/config.py).
  6. The Workflow executes the pipeline by calling task.propose(), task.predict(), task.select(), task.evaluate(), and task.learn().
  7. Each step touches the filesystem only for logging or artifact storage; no external database or network is invoked unless a domain task explicitly does so (e.g., tasks/gui/src/rsi_anything_gui/aggregate.py writes a JSON summary).

The workflow module is the single hub; any change to the selection logic propagates to all domains. This tight coupling makes the pipeline powerful but also a critical maintenance point.

How To Use It

Setup

git clone https://github.com/moses-y/RSI-Anything
cd RSI-Anything
pip install -e .

The root pyproject.toml pulls JEPA-Anything and the core dependencies. Domain‑specific requirements are in tasks/code_repair/requirements.txt and tasks/gui/requirements.txt.

Configuration Edit JSON files in the configs directory. For code repair, start with configs/code_repair/default.json. No environment variables are required for the minimal launch.

Running

# Run the default code‑repair pipeline
python -m rsi_anything code-repair

# Launch the GUI demo
python -m rsi_anything gui

The CLI will print progress and write artifacts to the artifacts folder under the current working directory.

Real‑World Use

A research lab can use RSI‑Anything to iteratively improve a reaction‑optimization policy. The lab writes a custom tasks/reaction_optimization.py that defines the state, actions, and reward. It then supplies a config (configs/reaction_optimization.json). The framework will generate candidate protocols, predict yields using a world model, select promising protocols, run them in a reactor simulator, learn from the results, and retain the improved policy for the next round.

Code Health & Issues

  • Low – Dependencies declared without a lockfile (pyproject.toml has no poetry.lock or Pipfile.lock). Reproducibility may suffer.
  • Medium – No Dockerfile; deployment requires manual setup of the Python environment.
  • Low – CI defined in .github/workflows/* but only covers code‑repair and GUI tests; no end‑to‑end integration test for the full pipeline.

The repository contains 85 test files, but many domain modules lack unit tests (e.g., GUI interactions). Documentation is extensive but scattered across docs/ and tasks/gui/docs/.

The Bottom Line

RSI‑Anything offers a clean, reusable workflow that unifies prediction‑guided decision making across domains. Its Pythonic structure and CLI make it approachable, while the tight coupling in workflow/runner demands careful change management. The absence of a lockfile and a Docker image limits reproducibility out of the box, but the modular design allows targeted domain extensions. Researchers and developers looking for a common framework to iterate on complex tasks will find this repo a solid foundation.