Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

refactor(research): rewrite auto research module as Go event-driven pipeline #191

@crrow

Description

@crrow

Context

The current Rust rara-research module has a monolithic run_iteration() that tightly couples all 14 pipeline steps. This makes it impossible to:

  • Process multiple strategies concurrently
  • Resume after process restart
  • Decouple LLM generation/review from compilation/backtesting

Additionally, Rust toolchain is disk-heavy for the current hardware constraints.

Solution

Rewrite as a Go event-driven pipeline with:

  • Persistent event queue (SQLite) — survives restarts, pending events resume
  • Decoupled stages: Generate → Compile → Backtest → Review, each as independent event handler
  • Strategy knowledge base (SQLite) — stores all hypotheses, backtest data, LLM reviews for historical context
  • Feedback loop — rejected strategies trigger re-generation with historical context
  • Auto-promotion — approved strategies PR to rara-strategies repo

Sprint Plan

Sprint 1: Foundation

  • Go project scaffold, SQLite store, event queue, dispatcher, stage interface, CLI skeleton

Sprint 2: Pipeline Stages

  • Generate, compile, backtest, review stages with LLM CLI executor integration

Sprint 3: Promotion + Polish

  • Auto-PR to rara-strategies, feedback loop, status/history CLI, retry hardening

Acceptance Criteria

  • Pipeline processes strategies end-to-end (generate → compile → backtest → review)
  • Events persist in SQLite, resume after restart
  • Approved strategies auto-PR to rara-strategies
  • Rejected strategies re-enter pipeline with feedback context
  • rara-research status and rara-research history CLI commands work

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:claudeCreated by Claude agentrefactorCode restructuring without behavior change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions