# avinash8891/agents-auto-research architecture

> Architecture diagram of the GitHub repository avinash8891/agents-auto-research, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/avinash8891/agents-auto-research
- Repository: https://github.com/avinash8891/agents-auto-research

## Overview

1. **What this repo is**
   - `agents-auto-research` is an autonomous research loop for quantitative trading strategies.
   - The system iterates over a **thesis → compile → backtest → evaluate → learn** cycle, currently centered on the `ema` and `orb` strategy families.

2. **Top-level control flow**
   - `autoresearch_controller.py` is the main state machine and loop coordinator.
   - It delegates round-level work to `autoresearch_orchestration.py`, which fans out into planning, research, compilation, and experiment evaluation.
   - The outputs of one round become inputs to the next via saved state, trace artifacts, and database records.

3. **Planning and thesis generation**
   - `autoresearch_planning.py` selects what to test next based on previous results and constraints.
   - `autoresearch_research.py` drives per-thesis research and produces structured outputs that describe config changes, expected effects, and disqualifiers.
   - `research_conductor.py` is the LLM-facing conductor that coordinates subagents and tool usage.

4. **Agent layer**
   - `research_subagents.py` contains specialist agents such as analyst and web-research roles.
   - `agent_runners.py`, `agent_openai_calls.py`, and `agent_infra.py` wrap OpenAI Agents SDK / API calls, retries, proxy handling, and usage accounting.
   - This layer depends on the local `openai-oauth` proxy mentioned in the README, so agent execution is an external-service boundary.

5. **Compiler / operationalization layer**
   - `compiler_pipeline.py` is the main orchestration point for turning a thesis into something runnable.
   - `compiler_builder.py`, `compiler_operationalize.py`, and `compiler_thesis_io.py` generate, validate, and persist missing strategy primitives or config code.
   - This plane is what bridges the research hypothesis into concrete strategy/runtime changes.

6. **Strategy family boundary**
   - `strategies/` defines the pluggable strategy families, with `ema/` and `orb/` as first-class examples and `_demo/` as a scaffold.
   - Each family exposes research descriptions, validation rules, defaults, prompts, signals, exits, and runner/contract/schema logic.
   - `strategy_family.py` and `strategies/base.py` form the registration and abstraction boundary used by the rest of the system.

7. **Backtest execution**
   - `backtest/` is the simulation engine: data universe handling, resampling, filters, result schema, diagnostics, and the runner.
   - Family-specific wrappers such as `backtest_5ema.py`, `backtest_orb_v2.py`, and `strategies/orb/runner.py` connect strategy configs to the shared engine.
   - `data_loader.py`, `analyst_dataframe_helpers.py`, and `numba_kernels.py` support market data loading, analysis, and performance-critical computations.

8. **Evaluation and metrics**
   - `experiment_evaluator.py`, `eval_harness.py`, `eval_cli.py`, and `eval_metrics.py` compute and report experiment outcomes.
   - `metrics.py`, `diagnostic_contracts.py`, and `backtest/event_diagnostics.py` define the signals used to judge whether a thesis improved the strategy.
   - Evaluation is a separate concern from raw backtesting: it interprets results in the context of the research loop.

9. **Persistence and state**
   - `backtest_run_db.py` stores experiment records in SQLite; the test suite includes crash-consistency and timestamp coverage for that DB path.
   - `autoresearch_state.py`, `autoresearch_paths.py`, and `autoresearch_runtime_paths.py` manage JSON/state-file locations for the active run.
   - `research_memory.py` provides cross-session memory, while `persistence_utils.py` and `artifact_io.py` handle file serialization and artifact I/O.

10. **Tracing, artifacts, and replayable evidence**
   - `trace_sdk.py` and the `trace_*` modules record agent and research events for later analysis.
   - `trace_adapters/` converts traces from specific improvement systems (`halo`, `recursive_improve`, `reflexio`) into the repo’s common format.
   - `runtime/`, `trace_exports/`, and `runtime/jobs/` hold persisted round artifacts, summaries, and trace exports that make runs auditable and replayable.

11. **Self-improvement and reflection tooling**
   - `improvement_halo.py`, `improvement_recursive_improve.py`, `improvement_reflexion.py`, and related modules analyze traces and generate improvement suggestions.
   - These modules do not run the strategy loop directly; they operate on the loop’s outputs to propose better prompts, tool order, or agent behavior.
   - `reflexio_agent_reflections.py` and `trace_improvement_report.py` are part of this post-run learning pipeline.

12. **Operational entry points**
   - `autoresearch_cli.py` is the local CLI for managing experiments.
   - `vps_runner.py` deploys a chosen git ref over SSH to a remote host and launches the controller in a tmux session, making remote execution a first-class workflow.
   - `web_research_cli.py` and `scripts/` provide supporting operational tasks such as trace review, token audits, and environment setup.

13. **Configuration and policy boundaries**
   - `configs/` defines base strategy configs and variants used by the research loop and backtests.
   - `compiler_defaults.py`, `compiler_validate.py`, `orb_contract.py`, `strategies/*/validate.py`, and `strategies/validate_utils.py` enforce which config changes are legal.
   - `thesis_validator.py`, `research_doctrine.py`, and `family_research_spec.py` encode higher-level rules about what constitutes a valid research proposal.

14. **External dependencies that matter architecturally**
   - Market data comes from a local filesystem root configured via `AUTORESEARCH_DATA_ROOT`.
   - LLM/agent execution depends on the OpenAI proxy and SDK boundary.
   - Remote orchestration depends on SSH access to a VPS, and optional run notifications can go to Discord webhooks.

15. **How to draw the diagram**
   - The central loop is: controller/orchestration → conductor/subagents → compiler → backtest engine → evaluator → persistence/traces → next planning round.
   - Around that loop sit the strategy-family plugins, configuration/schema validation, and the artifact/trace stores.
   - A separate operational path handles VPS deployment and remote execution, while another side path consumes traces for improvement analysis.

Main entry points: [`autoresearch_controller.py`](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_controller.py) (Controller), [`compiler_pipeline.py`](https://github.com/avinash8891/agents-auto-research/blob/main/compiler_pipeline.py) (Compiler), [`backtest/runner.py`](https://github.com/avinash8891/agents-auto-research/blob/main/backtest/runner.py) (Backtest runner), [`autoresearch_planning.py`](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_planning.py) (Planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core loop"]
  node_autoresearch_controller(("Controller<br/>state machine"))
  node_autoresearch_orchestration["Orchestration<br/>round planner"]
  node_autoresearch_planning["Planning<br/>next-thesis selector"]
  node_autoresearch_research["Research<br/>thesis execution"]
end

subgraph group_agent["Agent layer"]
  node_research_conductor(("Conductor<br/>llm coordinator"))
  node_research_subagents["Subagents<br/>specialist roles"]
  node_agent_runners["Runners<br/>agent runtime<br/>[agent_runners.py]"]
  node_agent_openai_calls["OpenAI calls<br/>api wrapper"]
end

subgraph group_compiler["Compiler plane"]
  node_compiler_pipeline["Compiler<br/>thesis-to-code pipeline"]
  node_compiler_builder["Builder<br/>code synthesis"]
  node_compiler_operationalize["Operationalize<br/>apply changes"]
end

subgraph group_strategy["Strategy families"]
  node_strategies_base["Strategy base<br/>strategy abstraction<br/>[base.py]"]
  node_strategy_family["Family registry<br/>family boundary<br/>[strategy_family.py]"]
  node_strategies_ema["EMA family<br/>strategy family<br/>[strategy.py]"]
  node_strategies_orb["ORB family<br/>strategy family<br/>[strategy.py]"]
end

subgraph group_backtest["Backtest engine"]
  node_backtest_runner["Backtest runner<br/>simulation runner<br/>[runner.py]"]
  node_backtest_data[("Market data<br/>data universe<br/>[data_universe.py]")]
end

subgraph group_eval["Evaluation"]
  node_experiment_evaluator["Evaluator<br/>experiment scoring"]
  node_eval_metrics["Metrics<br/>[eval_metrics.py]"]
end

subgraph group_state["Persistence"]
  node_backtest_run_db[("Run DB<br/>sqlite store<br/>[backtest_run_db.py]")]
  node_autoresearch_state["State file<br/>run state"]
  node_research_memory[("Memory<br/>[research_memory.py]")]
end

subgraph group_trace["Tracing & learning"]
  node_trace_sdk["Trace SDK<br/>event tracing<br/>[trace_sdk.py]"]
  node_trace_adapters["Trace adapters<br/>importers<br/>[__init__.py]"]
  node_improvement_halo["Halo<br/>trace analysis"]
  node_improvement_recursive_improve["Recursive improve<br/>trace analysis"]
  node_improvement_reflexion["Reflexion<br/>trace analysis"]
end

subgraph group_ops["Operations"]
  node_autoresearch_cli(("CLI<br/>local entrypoint"))
  node_vps_runner["VPS runner<br/>remote deploy<br/>[vps_runner.py]"]
end

subgraph group_policy["Policy & validation"]
  node_research_doctrine["Doctrine<br/>research policy"]
  node_thesis_validator["Thesis validator<br/>proposal validation"]
  node_compiler_validate["Compiler validate<br/>config checks"]
  node_strategies_validate_utils["Validate utils<br/>family validation<br/>[validate_utils.py]"]
end

node_autoresearch_controller -->|"coordinates"| node_autoresearch_orchestration
node_autoresearch_orchestration -->|"plans next"| node_autoresearch_planning
node_autoresearch_orchestration -->|"runs research"| node_autoresearch_research
node_autoresearch_research -->|"uses"| node_research_conductor
node_research_conductor -->|"delegates"| node_research_subagents
node_research_conductor -->|"executes via"| node_agent_runners
node_agent_runners -->|"calls"| node_agent_openai_calls
node_autoresearch_research -->|"hands off"| node_compiler_pipeline
node_compiler_pipeline -->|"builds"| node_compiler_builder
node_compiler_pipeline -->|"applies"| node_compiler_operationalize
node_compiler_pipeline -->|"checks"| node_compiler_validate
node_compiler_pipeline -->|"constrains"| node_thesis_validator
node_strategy_family -->|"extends"| node_strategies_base
node_strategy_family -->|"registers"| node_strategies_ema
node_strategy_family -->|"registers"| node_strategies_orb
node_strategies_ema -->|"validates"| node_strategies_validate_utils
node_strategies_orb -->|"validates"| node_strategies_validate_utils
node_autoresearch_orchestration -->|"triggers"| node_backtest_runner
node_backtest_runner -->|"loads data"| node_backtest_data
node_strategies_orb -->|"runs on"| node_backtest_runner
node_backtest_runner -->|"emits results"| node_experiment_evaluator
node_experiment_evaluator -->|"scores with"| node_eval_metrics
node_backtest_runner -->|"persists"| node_backtest_run_db
node_autoresearch_controller -->|"stores"| node_autoresearch_state
node_autoresearch_controller -->|"remembers"| node_research_memory
node_autoresearch_controller -->|"traces"| node_trace_sdk
node_trace_sdk -->|"imports"| node_trace_adapters
node_trace_adapters -->|"feeds"| node_improvement_halo
node_trace_adapters -->|"feeds"| node_improvement_recursive_improve
node_trace_adapters -->|"feeds"| node_improvement_reflexion
node_improvement_halo -->|"informs"| node_autoresearch_planning
node_improvement_recursive_improve -->|"informs"| node_autoresearch_planning
node_improvement_reflexion -->|"informs"| node_autoresearch_planning
node_autoresearch_cli -->|"starts"| node_autoresearch_controller
node_vps_runner -->|"launches"| node_autoresearch_controller
node_research_doctrine -->|"defines rules"| node_thesis_validator
node_thesis_validator -->|"gates"| node_autoresearch_planning

click node_autoresearch_controller "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_controller.py"
click node_autoresearch_orchestration "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_orchestration.py"
click node_autoresearch_planning "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_planning.py"
click node_autoresearch_research "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_research.py"
click node_research_conductor "https://github.com/avinash8891/agents-auto-research/blob/main/research_conductor.py"
click node_research_subagents "https://github.com/avinash8891/agents-auto-research/blob/main/research_subagents.py"
click node_agent_runners "https://github.com/avinash8891/agents-auto-research/blob/main/agent_runners.py"
click node_agent_openai_calls "https://github.com/avinash8891/agents-auto-research/blob/main/agent_openai_calls.py"
click node_compiler_pipeline "https://github.com/avinash8891/agents-auto-research/blob/main/compiler_pipeline.py"
click node_compiler_builder "https://github.com/avinash8891/agents-auto-research/blob/main/compiler_builder.py"
click node_compiler_operationalize "https://github.com/avinash8891/agents-auto-research/blob/main/compiler_operationalize.py"
click node_strategies_base "https://github.com/avinash8891/agents-auto-research/blob/main/strategies/base.py"
click node_strategy_family "https://github.com/avinash8891/agents-auto-research/blob/main/strategy_family.py"
click node_strategies_ema "https://github.com/avinash8891/agents-auto-research/blob/main/strategies/ema/strategy.py"
click node_strategies_orb "https://github.com/avinash8891/agents-auto-research/blob/main/strategies/orb/strategy.py"
click node_backtest_runner "https://github.com/avinash8891/agents-auto-research/blob/main/backtest/runner.py"
click node_backtest_data "https://github.com/avinash8891/agents-auto-research/blob/main/backtest/data_universe.py"
click node_experiment_evaluator "https://github.com/avinash8891/agents-auto-research/blob/main/experiment_evaluator.py"
click node_eval_metrics "https://github.com/avinash8891/agents-auto-research/blob/main/eval_metrics.py"
click node_backtest_run_db "https://github.com/avinash8891/agents-auto-research/blob/main/backtest_run_db.py"
click node_autoresearch_state "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_state.py"
click node_research_memory "https://github.com/avinash8891/agents-auto-research/blob/main/research_memory.py"
click node_trace_sdk "https://github.com/avinash8891/agents-auto-research/blob/main/trace_sdk.py"
click node_trace_adapters "https://github.com/avinash8891/agents-auto-research/blob/main/trace_adapters/__init__.py"
click node_improvement_halo "https://github.com/avinash8891/agents-auto-research/blob/main/improvement_halo.py"
click node_improvement_recursive_improve "https://github.com/avinash8891/agents-auto-research/blob/main/improvement_recursive_improve.py"
click node_improvement_reflexion "https://github.com/avinash8891/agents-auto-research/blob/main/improvement_reflexion.py"
click node_autoresearch_cli "https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_cli.py"
click node_vps_runner "https://github.com/avinash8891/agents-auto-research/blob/main/vps_runner.py"
click node_research_doctrine "https://github.com/avinash8891/agents-auto-research/blob/main/research_doctrine.py"
click node_thesis_validator "https://github.com/avinash8891/agents-auto-research/blob/main/thesis_validator.py"
click node_compiler_validate "https://github.com/avinash8891/agents-auto-research/blob/main/compiler_validate.py"
click node_strategies_validate_utils "https://github.com/avinash8891/agents-auto-research/blob/main/strategies/validate_utils.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_autoresearch_controller,node_autoresearch_orchestration,node_autoresearch_planning,node_autoresearch_research,node_backtest_run_db,node_autoresearch_state,node_research_memory toneBlue
class node_research_conductor,node_research_subagents,node_agent_runners,node_agent_openai_calls,node_trace_sdk,node_trace_adapters,node_improvement_halo,node_improvement_recursive_improve,node_improvement_reflexion toneAmber
class node_compiler_pipeline,node_compiler_builder,node_compiler_operationalize,node_autoresearch_cli,node_vps_runner toneMint
class node_strategies_base,node_strategy_family,node_strategies_ema,node_strategies_orb,node_research_doctrine,node_thesis_validator,node_compiler_validate,node_strategies_validate_utils toneRose
class node_backtest_runner,node_backtest_data toneIndigo
class node_experiment_evaluator,node_eval_metrics toneTeal
```

## Components

### Core loop

Main autonomous research state machine and round orchestration.

- [Controller](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_controller.py): state machine · Main loop coordinator for the autonomous research cycle. · `autoresearch_controller.py`
- [Orchestration](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_orchestration.py): round planner · Fans out round-level planning, research, compilation, and evaluation. · `autoresearch_orchestration.py`
- [Planning](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_planning.py): next-thesis selector · Chooses what to test next from prior results and constraints. · `autoresearch_planning.py`
- [Research](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_research.py): thesis execution · Drives per-thesis research and structured research outputs. · `autoresearch_research.py`

### Agent layer

LLM-facing research conductor and subagent/runtime wrappers.

- [Conductor](https://github.com/avinash8891/agents-auto-research/blob/main/research_conductor.py): llm coordinator · Coordinates subagents, prompts, and tool use for research tasks. · `research_conductor.py`
- [Subagents](https://github.com/avinash8891/agents-auto-research/blob/main/research_subagents.py): specialist roles · Specialist analyst and web-research roles used by the conductor. · `research_subagents.py`
- [Runners](https://github.com/avinash8891/agents-auto-research/blob/main/agent_runners.py): agent runtime · Execution wrappers for agent tasks and retries. · `agent_runners.py`
- [OpenAI calls](https://github.com/avinash8891/agents-auto-research/blob/main/agent_openai_calls.py): api wrapper · OpenAI SDK/API integration and request handling. · `agent_openai_calls.py`

### Compiler plane

Turns theses into runnable strategy/config changes.

- [Compiler](https://github.com/avinash8891/agents-auto-research/blob/main/compiler_pipeline.py): thesis-to-code pipeline · Orchestrates operationalization of a thesis into runnable changes. · `compiler_pipeline.py`
- [Builder](https://github.com/avinash8891/agents-auto-research/blob/main/compiler_builder.py): code synthesis · Generates or fills in strategy primitives and config code. · `compiler_builder.py`
- [Operationalize](https://github.com/avinash8891/agents-auto-research/blob/main/compiler_operationalize.py): apply changes · Bridges research hypotheses into concrete runtime changes. · `compiler_operationalize.py`

### Strategy families

Pluggable strategy abstractions and concrete families.

- [Strategy base](https://github.com/avinash8891/agents-auto-research/blob/main/strategies/base.py): strategy abstraction · Common strategy interface and registration boundary. · `strategies/base.py`
- [Family registry](https://github.com/avinash8891/agents-auto-research/blob/main/strategy_family.py): family boundary · Strategy-family registration and selection used by the rest of the system. · `strategy_family.py`
- [EMA family](https://github.com/avinash8891/agents-auto-research/blob/main/strategies/ema/strategy.py): strategy family · Concrete EMA strategy family with prompts, defaults, signals, and validation. · `strategies/ema/strategy.py`
- [ORB family](https://github.com/avinash8891/agents-auto-research/blob/main/strategies/orb/strategy.py): strategy family · Concrete ORB strategy family with runner, schema, and validation. · `strategies/orb/strategy.py`

### Backtest engine

Simulation, market data, and strategy execution support.

- [Backtest runner](https://github.com/avinash8891/agents-auto-research/blob/main/backtest/runner.py): simulation runner · Executes the shared simulation engine for strategy experiments. · `backtest/runner.py`
- [Market data](https://github.com/avinash8891/agents-auto-research/blob/main/backtest/data_universe.py): data universe · Universe loading, resampling, filters, and data preparation. · `backtest/data_universe.py`

### Evaluation

Interprets backtest outcomes and experiment quality.

- [Evaluator](https://github.com/avinash8891/agents-auto-research/blob/main/experiment_evaluator.py): experiment scoring · Computes and interprets experiment outcomes for the research loop. · `experiment_evaluator.py`
- [Metrics](https://github.com/avinash8891/agents-auto-research/blob/main/eval_metrics.py): outcome metrics · Evaluation metrics and diagnostics used to judge thesis impact. · `eval_metrics.py`

### Persistence

Run state, memory, and experiment storage.

- [Run DB](https://github.com/avinash8891/agents-auto-research/blob/main/backtest_run_db.py): sqlite store · Persistent experiment record store for backtest runs. · `backtest_run_db.py`
- [State file](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_state.py): run state · JSON state for the active run and round progression. · `autoresearch_state.py`
- [Memory](https://github.com/avinash8891/agents-auto-research/blob/main/research_memory.py): cross-session memory · Cross-session research memory and recalled context. · `research_memory.py`

### Tracing & learning

Trace capture, exports, adapters, and post-run improvement.

- [Trace SDK](https://github.com/avinash8891/agents-auto-research/blob/main/trace_sdk.py): event tracing · Records research and agent events for later analysis. · `trace_sdk.py`
- [Trace adapters](https://github.com/avinash8891/agents-auto-research/blob/main/trace_adapters/__init__.py): importers · Converts external improvement traces into the common format. · `trace_adapters/__init__.py`
- [Halo](https://github.com/avinash8891/agents-auto-research/blob/main/improvement_halo.py): trace analysis · Post-run improvement analysis based on trace evidence. · `improvement_halo.py`
- [Recursive improve](https://github.com/avinash8891/agents-auto-research/blob/main/improvement_recursive_improve.py): trace analysis · Trace-driven improvement suggestions and analysis. · `improvement_recursive_improve.py`
- [Reflexion](https://github.com/avinash8891/agents-auto-research/blob/main/improvement_reflexion.py): trace analysis · Reflection and improvement generation from traces. · `improvement_reflexion.py`

### Operations

CLI, remote execution, and scripts for running the system.

- [CLI](https://github.com/avinash8891/agents-auto-research/blob/main/autoresearch_cli.py): local entrypoint · Local command-line entrypoint for managing experiments. · `autoresearch_cli.py`
- [VPS runner](https://github.com/avinash8891/agents-auto-research/blob/main/vps_runner.py): remote deploy · Deploys a git ref over SSH and launches the controller remotely. · `vps_runner.py`

### Policy & validation

Research rules, thesis constraints, and config validation.

- [Doctrine](https://github.com/avinash8891/agents-auto-research/blob/main/research_doctrine.py): research policy · High-level rules for valid research proposals. · `research_doctrine.py`
- [Thesis validator](https://github.com/avinash8891/agents-auto-research/blob/main/thesis_validator.py): proposal validation · Validates thesis quality and constraints. · `thesis_validator.py`
- [Compiler validate](https://github.com/avinash8891/agents-auto-research/blob/main/compiler_validate.py): config checks · Validation rules for compiler-generated changes and configs. · `compiler_validate.py`
- [Validate utils](https://github.com/avinash8891/agents-auto-research/blob/main/strategies/validate_utils.py): family validation · Shared validation helpers for strategy families. · `strategies/validate_utils.py`

## Connections

- Controller → Orchestration: coordinates · Controller delegates round work to orchestration.
- Orchestration → Planning: plans next · Orchestration asks planning what to test next.
- Orchestration → Research: runs research · Orchestration dispatches thesis research.
- Research → Conductor: uses · Research execution is mediated by the LLM conductor.
- Conductor → Subagents: delegates · Conductor coordinates specialist roles.
- Conductor → Runners: executes via · Conductor uses agent runtime wrappers.
- Runners → OpenAI calls: calls · Runners wrap OpenAI API interactions.
- Research → Compiler: hands off · Research outputs feed compilation/operationalization.
- Compiler → Builder: builds · Compiler pipeline synthesizes missing strategy primitives.
- Compiler → Operationalize: applies · Pipeline bridges thesis into runnable changes.
- Compiler → Compiler validate: checks · Generated changes are validated before use.
- Compiler → Thesis validator: constrains · Thesis-level constraints gate compiler input.
- Family registry → Strategy base: extends · Family registry is built on the base strategy abstraction.
- Family registry → EMA family: registers · EMA is a first-class family.
- Family registry → ORB family: registers · ORB is a first-class family.
- EMA family → Validate utils: validates · EMA-specific validation uses shared helpers.
- ORB family → Validate utils: validates · ORB-specific validation uses shared helpers.
- Orchestration → Backtest runner: triggers · Research rounds culminate in backtest execution.
- Backtest runner → Market data: loads data · Runner depends on market data universe preparation.
- ORB family → Backtest runner: runs on · ORB family provides runner integration for the engine.
- Backtest runner → Evaluator: emits results · Simulation results flow into evaluation.
- Evaluator → Metrics: scores with · Evaluator relies on metrics and diagnostics.
- Backtest runner → Run DB: persists · Experiment runs are recorded in SQLite.
- Controller → State file: stores · Loop progression is persisted in run state.
- Controller → Memory: remembers · Cross-round and cross-session memory informs future rounds.
- Controller → Trace SDK: traces · Controller and research events are recorded for replay.
- Trace SDK → Trace adapters: imports · Adapters normalize external trace formats.
- Trace adapters → Halo: feeds · Imported traces support Halo analysis.
- Trace adapters → Recursive improve: feeds · Imported traces support recursive-improve analysis.
- Trace adapters → Reflexion: feeds · Imported traces support reflexion analysis.
- Halo → Planning: informs · Improvement outputs shape the next planning round.
- Recursive improve → Planning: informs · Trace-driven suggestions feed future planning.
- Reflexion → Planning: informs · Reflection outputs influence subsequent plans.
- CLI → Controller: starts · CLI launches the main controller loop.
- VPS runner → Controller: launches · Remote VPS execution starts the controller in tmux.
- Doctrine → Thesis validator: defines rules · Doctrine provides the higher-level research policy.
- Thesis validator → Planning: gates · Planning is constrained by thesis validity rules.
