Skip to main content

Strategy Development (Consolidated /strategy-development/*)

The Vite frontend exposes a single consolidated umbrella for every strategy-authoring + strategy-testing surface under /strategy-development/*. Sixteen sibling sub-routes share the same persistent left sub-nav, a run-summary KPI strip, and a cross-route React context so navigating between (say) Compose → Simulate → Compare-Models keeps all the inputs (deployment id, symbols, time window, feature row, last task id) coherent.

Surfaces​

RouteComponentWraps
/strategy-developmentStrategyDevIndexRouteredirects to /strategy-development/composer
/strategy-development/composerStrategyComposerGET /strategies/components + POST /strategies
/strategy-development/simulationSimulationCreatordispatches to BotRuntime / LobBacktestEngine / AlphaBacktestExperiment / RLRuntime / paper
/strategy-development/ideationIdeationConsoleStage-aware POST /agents/ideate (stage=brainstorm|refine|hypothesis) via AgentRuntime + research_papers RAG; roster at GET /agents/ideation/roster

| /strategy-development/single-predict | SinglePredictRoute | POST /ml/test/single | | /strategy-development/predict-batch | PredictBatchRoute | POST /ml/test/batch (now Iceberg-aware) + POST /ml/test/upload-csv | | /strategy-development/compare-models | CompareModelsRoute | POST /ml/test/compare | | /strategy-development/scenario-perturbation | ScenarioPerturbationRoute | POST /ml/test/scenario | | /strategy-development/historical-eval | HistoricalEvalRoute | POST /ml/evaluate + GET /ml/evaluations/{task_id} | | /strategy-development/live-test | LiveTestRoute | POST /ml/live-test/start + useLiveStream | | /strategy-development/run-comparator | RunComparator | chained pairwise POST /ml/test/compare | | /strategy-development/document-library | DocumentLibrary | GET /rag/papers, POST /rag/papers/upload, POST /rag/papers/{id}/synthesize | | /strategy-development/library | StrategyLibraryRoute | GET /strategies/components (read-only registry browser) | | /strategy-development/templates | StrategyTemplatesPage | LEAN strategy template browser + clone-to-workspace — see alphaswarm_docs/strategy-templates.md | | /strategy-development/alpha-factors | AlphaFactorStudioRoute | Symbolic-DSL alpha formula editor; POST /quant-agents/factor/compile-preview + StrategyLibraryApi | | /strategy-development/gallery | GalleryRoute | Read-only examples gallery over the StrategyLibraryApi corpora | | /strategy-development/library-admin | LibraryAdminRoute | Library-admin console over the StrategyLibraryApi corpora |

Cross-route state​

alphaswarm_client/src/components/strategy-dev/StrategyDevContext.tsx holds the shared selection (deploymentId, deploymentIdB, symbols, start, end, featureRowText, perturbations, lastTaskId, lastRunSummary, composerYaml, strategyId). The context is backed by localStorage under the key alphaswarm.strategy-dev.selection.v1 so a hard refresh doesn't lose state.

Sub-routes use useStrategyDev() to read + patch the selection:

const { selection, setSelection } = useStrategyDev();
setSelection({ deploymentId: "abc", lastTaskId: res.task_id });

KPI strip​

RunKpiStrip reads selection.lastRunSummary and renders Sharpe / total return / max DD / hit rate / trades in the standard MetricsGrid. The strip is intentionally idle when no run has been launched in the current session so the surface stays calm.

Ideation Agents (AgentOps)​

The Ideation role family is advisor-only (template_target: ideation) and ships three staged agent specs plus an orchestrator handoff:

StageSpecMission
Brainstormingideation.brainstormingDiversify / expand / revive ideas into candidate briefs
Refinementideation.refinementNarrow a candidate into testable strategy YAML
Hypothesis Testingideation.hypothesisDesign/orchestrate experiments; dispatch existing backtest/analysis tasks — never invent metrics

Persistence: ideation_sessions / ideation_artifacts / ideation_test_ledger (K-tracking per hypothesis fingerprint). AgentOps cards live under /agents/roles/ideation; the console is at /strategy-development/ideation.

Hard-rule alignment​

  • Frontend rule (.cursor/rules/frontend.mdc): every long-running task is consumed via the existing useChatStream / useLiveStream hooks so the WS pipeline + kill-switch + sandbox banner all stay intact.
  • AGENTS rule 2: LLM-driven surfaces (IdeationConsole, PaperSynthesisDrawer) route through router_complete server-side.
  • AGENTS rule 4: progress framing is unchanged — sub-routes never publish to Redis directly; they always go through _progress.emit on the backend.

How to add a sub-route​

  1. Create alphaswarm_client/src/routes/strategy-development/<slug>/page.tsx wrapping the new component.
  2. Add the new component under alphaswarm_client/src/components/strategy-dev/.
  3. Register the route in alphaswarm_client/src/routes.tsx's DYNAMIC_ROUTES entry for strategy-development.
  4. Add a StrategyDevSubRoute entry to alphaswarm_client/src/components/strategy-dev/SubNav.tsx so the new route appears in the persistent left nav.

Legacy​

The legacy webui /ml/test page is now superseded by this consolidated surface. Bookmarks still work because the flat REAL_ROUTES entry is preserved, but the sidebar no longer surfaces it.