How aaadistance/reprolens works
ReproLens is an auditable research-paper reproduction agent. Users submit a paper, code repository, and optional data; the workflow extracts evidence-backed claims, plans and runs controlled experiments, diagnoses differences, optionally applies reviewed patches, verifies results with deterministic rules, and produces reports and evidence packages. The graph preserves the documented interfaces and major capabilities. Some subsystem links rely on README or SOURCE INDEX references because the corresponding implementation was not excerpted.
Main entry points: orchestrator.ts Workflow orchestrator · runtime.ts Runtime assembly · server.ts HTTP API · report.ts Report and evidence package
Components 29
User interfaces
- Command line
src/cli.ts - Web console
public/app.js - HTTP API
src/httpapi/server.ts - Terminal UI
src/tui/index.tsx - Desktop shell
desktop/main.mjs
Workflow coordination
- Runtime assembly
src/runtime.ts - Workflow orchestrator
src/orchestrator/orchestrator.ts - Workflow state machine
src/domain/state.ts
Experiment execution
- Experiment matrix
src/tools/matrix.ts - Run queue
src/tools/job-queue.ts - Runner selection
src/tools/runner.ts - Local runner
src/tools/local-runner.ts - Docker runner
src/tools/docker-runner.ts - SSH runner
src/tools/ssh-runner.ts - Code agent
src/codeagent/code-agent.ts - Command adapter
src/codeagent/command.ts - Patch safety and approval
src/tools/patch.ts
Evidence and analysis
- Paper and claim analysis
src/agent/analyzer.ts - Paper structure extraction
src/tools/structure.ts - Heuristic analysis
src/agent/heuristic.ts - OpenAI-compatible analysis
src/agent/openai.ts - Difference attribution
src/tools/attribution.ts - Rule-based verification
src/tools/verify.ts - Evidence assessment
src/tools/assessment.ts - Reproduction conclusion
src/tools/conclusion.ts - Report and evidence package
src/tools/report.ts
Project records
- Project and event store
src/store/store.ts - SQLite storage
src/store/sqlite-store.ts - Memory storage
src/store/memory-store.ts
Connections 31
- Command line → Runtime assembly: starts
src/cli.ts - Runtime assembly → Workflow orchestrator: assembles
src/runtime.ts - HTTP API → Workflow orchestrator: routes workflow
src/httpapi/server.ts - Web console → HTTP API: calls API
README.md - Terminal UI → HTTP API: uses API
README.md - Desktop shell → HTTP API: starts local API
README.md - Workflow orchestrator → Workflow state machine: advances states
README.md - Workflow orchestrator → Paper and claim analysis: requests analysis
src/orchestrator/orchestrator.ts - Heuristic analysis → Paper structure extraction: extracts claims
src/agent/heuristic.ts - Runtime assembly → Heuristic analysis: selects analyzer
src/runtime.ts - Runtime assembly → OpenAI-compatible analysis: selects analyzer
src/runtime.ts - Workflow orchestrator → Experiment matrix: expands plans
src/orchestrator/orchestrator.ts - Workflow orchestrator → Run queue: submits runs
src/orchestrator/orchestrator.ts - Workflow orchestrator → Runner selection: executes plans
src/orchestrator/orchestrator.ts - Runtime assembly → Runner selection: configures runner
src/runtime.ts - Runtime assembly → Local runner: selects runner
src/runtime.ts - Runtime assembly → Docker runner: selects runner
src/runtime.ts - Runtime assembly → SSH runner: selects runner
src/runtime.ts - Workflow orchestrator → Difference attribution: diagnoses differences
src/orchestrator/orchestrator.ts - Workflow orchestrator → Code agent: requests patch proposal
src/orchestrator/orchestrator.ts - Runtime assembly → Command adapter: configures adapter
src/runtime.ts - Command adapter → Code agent: implements interface
src/codeagent/command.ts - Workflow orchestrator → Patch safety and approval: validates patches
src/orchestrator/orchestrator.ts - Workflow orchestrator → Rule-based verification: checks run results
src/orchestrator/orchestrator.ts - Workflow orchestrator → Reproduction conclusion: maps verdict
src/orchestrator/orchestrator.ts - Workflow orchestrator → Report and evidence package: builds report
src/orchestrator/orchestrator.ts - Report and evidence package → Evidence assessment: includes assessment
src/tools/report.ts - Report and evidence package → Reproduction conclusion: includes conclusion
src/tools/report.ts - Workflow orchestrator → Project and event store: persists projects and events
src/orchestrator/orchestrator.ts - SQLite storage → Project and event store: implements interface
src/store/sqlite-store.ts - Memory storage → Project and event store: implements interface
src/store/memory-store.ts