- Remove ~44k LOC of dead code, legacy v1 TS simulator/strategy stack, event-bus, analytics FastAPI prototype, legacy calculation archives, and unused deps (data-ingestion provider API handlers untouched) - Extract @stock-bot/di/http-security and isolate @stock-bot/browser to data-ingestion via ServiceContainerBuilder.withRegistrations() - Harden @stock-bot/mongodb read-only proxies, flatten @stock-bot/postgres with unified master+research migrations, and fix @stock-bot/config EnvLoader, ServiceApplication worker lifecycle, NamespacedCache.clear(), and BatchProcessor error propagation - Flatten workspace root (remove apps/stock/package.json) and collapse orchestrator re-export shims - Pin all Docker image versions, add shm_size/nofile/RAM caps and docker-compose.quant.yml, fix 05-add-visible-column.sql view recreation, and decouple dev/QA Compose project names for side-by-side execution - Update PLATFORM-PLAN, DATA-CONTRACTS (bars_1m PARTITION BY MONTH, Rust bulk ETL, DuckDB limits), MILESTONES, and servers docs |
||
|---|---|---|
| .. | ||
| data-pipeline | ||
| development | ||
| guide | ||
| backtest-datasets.md | ||
| DATA-CONTRACTS.md | ||
| MILESTONES.md | ||
| PLATFORM-PLAN.md | ||
| README.md | ||
| servers.md | ||
| VALIDATION-AND-RIGOR.md | ||
Stock Bot — Documentation Map
Start here. Every document below has a single responsibility; historical sprint logs and superseded design notes have been retired.
1. Platform Direction & Execution Plan
| Document | Owns | When to Read |
|---|---|---|
| PLATFORM-PLAN.md | Target system architecture, settled decisions (D1–D12), layer boundaries, agent roles, and IB execution model |
Before making architectural changes or starting a new milestone |
| MILESTONES.md | Active checklist (M0 → M5), task order, explicit scope cuts, target file paths, and falsifiable exit criteria |
Day-to-day execution for you, Claude Code, and Studio agents |
| DATA-CONTRACTS.md | Raw MongoDB provider quirks, PostgreSQL security-master DDL, split/volume un-adjustment rules, known_at derivation, DuckDB/Parquet & QuestDB 10.2.0 schemas, and MarketDataStore API |
Before touching data-pipeline, data-ingestion, SQL migrations, or MarketDataStore |
| VALIDATION-AND-RIGOR.md | Canonical metric definitions, trial_ledger schema, effective-trials DSR (\hat{N}), CSCV PBO, Purged CPCV/Walk-Forward, rolling 6-month Vault + Post-2023 Recency Gate, lifecycle gates, and Dual Live Drift + IB/TSX execution rules |
Before touching libs/calculations, libs/research, validation workflows, or paper/live execution |
| servers.md | Host roles (quant 12900K research/data server, 9900K isolated IB live/paper host, TrueNAS cold storage, dev workstation) and port/storage layout |
Infrastructure, deployment, and worker sizing |
2. Current Connected Runtime & Code Tour
These documents describe what is already implemented and running in code today:
| Document | Owns |
|---|---|
| guide/README.md | High-level tour of the current canonical single-asset research workbench |
| guide/system-map.md | Applications, shared libraries, queues, and process boundaries |
| guide/backtest-walkthrough.md | End-to-end trace of a canonical backtest from HTTP admission to Rust replay and result persistence |
| guide/strategy-development.md | Current StrategyProgram callback contract and isolated candidate packaging |
| guide/code-reading.md | Function-level call paths across web-api, orchestrator, and engine |
| backtest-datasets.md | Current v2 retained dataset snapshot preparation, hashing, and local export |
| data-pipeline/phase1-investigation.md | Measured 31-collection QA MongoDB inventory, identifier coverage, and cross-provider tricky cases |
3. Enduring Architecture Decisions & Gates
| Document | Owns |
|---|---|
| development/QUALITY-GATES.md | Build, typecheck, contract, lint, native Rust, disposable PostgreSQL/Redis, and E2E verification gates |
| development/architecture/overview.md | Core invariants of the Rust financial kernel and durable worker supervision |
| development/architecture/research-product.md | Retained provenance, idempotency, agent grants (A01), candidate isolation (A02), and paper custody (A04) |
| development/architecture/benchmarks.md | Reproducible dataset and replay benchmark methodology |
| development/architecture/decisions/ | Approved ADRs 001–008 (ownership, 8-decimal postings, availability timing, NAPI pull boundary, durable cutover, AI boundary, performance) |