Documentation Validation Report¶
Date: 2026-04-01 Validator: Claude QA (quant trading + devcontainer context) Method: Two-pass validation: (1) static analysis via parallel agents, (2) runtime execution inside devcontainer. Devcontainer: Built via devcontainer up, commands run with devcontainer exec.
Summary¶
Issue Legend¶
- BUG: Command fails or produces wrong output
- GAP: Missing information needed to complete a step
- STALE: Outdated reference (renamed file, changed API, etc.)
- WRONG-PATH: File path or URL doesn't exist
- WRONG-CMD: Command syntax is incorrect
- MISLEADING: Content is technically correct but misleading
Detailed Findings¶
quickstarts/onboarding.md¶
No issues found. All cross-reference links verified.
quickstarts/01-your-first-backtest.md¶
Runtime confirmed (devcontainer):
tradai strategy backtest --helpreturnsNo such command 'backtest'. Did you mean 'test', 'ab-test'?
- Lines 28-33: [WRONG-CMD]
tradai strategy backtestdoes not exist. Nobacktestsubcommand onstrategy_app. The correct command istradai strategy-service backtestortradai backtest quick. - Line 54: [MISLEADING]
tradai data syncrequirestradai-data-collectionpackage to be installed (lazy-loaded fromtradai.data_collection.cli). New devs without it will silently not see thedatasubcommand. No prerequisite note.
quickstarts/02-create-new-strategy.md¶
Runtime confirmed (devcontainer):
tradai strategy new MyMomentumStrategy --category momentum --timeframe 1h --can-short -y -o /tmp/strat-testsucceeds. Generated 17 files. Must run from repo root or setTRADAI_ROOT(not documented).
- Line 19: [MISLEADING] Directory shown as
strategies/mymomentstrategy/buttradai strategy newoutputs to CWD, not astrategies/subdirectory (unless--output-diris used). - Lines 19-33: [GAP] Generated directory tree is incomplete -- actual output has 17 files. Missing from docs:
Dockerfile,README.md,MyMomentumStrategy.py(root-level),.pre-commit-config.yaml,configs/backtest.json,configs/freqai_training.json,tradai.yaml,tests/__init__.py,src/.../exceptions.py. - Line 9: [GAP]
tradai strategy newrequires running from repo root orTRADAI_ROOTenv var. Error: "Could not find cookiecutter-tradai-strategy". Not documented. - Line 71: [MISLEADING] Test path
strategies/mymomentstrategy/tests/uses incorrectstrategies/prefix (same root cause).
quickstarts/03-collect-market-data.md¶
Runtime confirmed (devcontainer):
tradai data sync --help,tradai data list-symbols --help,tradai data check-freshness --helpall work. Flags--timeframe,--days,--incrementalall verified.
- Lines 19-25: [WRONG-CMD] Exchange JSON uses
"type": "futures"but the actualExchangeConfigfield is"trading_mode". Pydantic v2 silently ignores unknown fields, so this works only because the default is alreadyFUTURES. Would silently fail for spot mode. - Line 30: [STALE]
DATA_COLLECTION_ARCTIC_LIBRARY="futures"but actual default (perArcticSettingsMixinand.env.example) isohlcv. - Line 164: [STALE] Storage diagram shows
Library: "futures"but actual default library name isohlcv. - Line 181: [STALE] Configuration table states
DATA_COLLECTION_ARCTIC_LIBRARYdefault isfutures; actual default isohlcv.
developer-guides/01-setup.md¶
Runtime validated:
just setupexecuted. Steps 1-2 pass. Step 3 fails ifcore.hooksPathis set (pre-commit refuses). Step 4 never reached. Doc does not mention this common failure mode.
- Line 22: [GAP]
just setupcan fail at pre-commit install ifcore.hooksPathis set globally. No troubleshooting guidance for this. - Line 33: [MISLEADING]
git clone https://github.com/tradai-bot/tradai.gitthencd tradai-- The remote is technicallytradai.git, but the local directory used throughout the project istradai-uv. Developers who already have the repo astradai-uvwill be confused. - Line 42: [STALE] Setup output says
TradAI Setup (Step 1/4): Installing Python 3.11...but actual justfile outputsStep 1/4: Installing Python 3.11...(no "TradAI Setup" prefix, different emoji). - Line 43: [STALE] Setup output says
TradAI Setup (Step 2/4): Syncing dependencies...but actual saysStep 2/4: Syncing all workspace packages + dev tools.... - Lines 44-45: [STALE] Same prefix/wording mismatch pattern on remaining setup steps.
- Lines 59-78: [STALE]
just doctorexpected output shows custom formatted block with "Checking required tools..." etc. Actual implementation uses a RichTablewith "TradAI Doctor" title and "Check / Status / Message" columns. Output format completely different. - Lines 143-147: [BUG]
.envdescribed as containingBINANCE_API_KEYandBINANCE_SECRET_KEY. These env vars do NOT exist in.env.exampleor anywhere in the codebase. Exchange config usesDATA_COLLECTION_EXCHANGES(JSON) inservices/data-collection/.env.example. - Line 149: [MISLEADING] Claims
BACKEND_URLandTRADAI_UI_URLin.envare for Docker container-to-container communication. Actually.env.examplesetsBACKEND_URL=http://localhost:8000(a host URL for CLI). Docker internal URLs likeBACKEND_DATA_COLLECTION_URLare indocker-compose.yaml, not.env.
developer-guides/docker-setup.md¶
Runtime confirmed:
just psworks. All services healthy. Postgres mapped to host port 5433 not 5432. MLflow/healthreturnsOK.
- Line 19: [MISLEADING]
cd tradaiafter cloningtradai.git-- same clone URL issue as 01-setup.md. - Lines 24-26: [BUG] Instructs to copy per-service
.env.examplefiles but omits.env.docker.docker-compose.yamlreferences.env.dockerinenv_file:blocks. Without it, Docker services will fail to start. - Line 59: [MISLEADING] Lists postgres at port 5432. Base
docker-compose.yamlhas NO host port mapping. Override maps to host port 5433:${POSTGRES_PORT:-5433}:5432. Developers will fail connecting to 5432. - Lines 79-84: [MISLEADING] Shows
MLFLOW_TRACKING_URI=http://mlflow:5000as internal URL. Actual docker-compose usesBACKEND_MLFLOW_TRACKING_URIandSTRATEGY_SERVICE_MLFLOW_TRACKING_URI, notMLFLOW_TRACKING_URI. - Lines 107-120: [STALE] Multi-stage Dockerfile example is significantly different from actual: doc uses
pip install uv && uv sync, actual usesCOPY --from=ghcr.io/astral-sh/uv:latestand wheel builds. Doc shows 2 stages, actual has 4. Doc CMD ispython -m tradai.backend, actual isbackend serve. - Lines 141-144: [MISLEADING] Dev volume mounts
./services/backend/src:/app/src:cachedand./libs:/app/libs:cacheddo NOT exist in docker-compose. Actual dev mounts are for user_data, strategies, AWS creds. Override file says "useuv runlocally instead of Docker". - Lines 149-155: [GAP] Volume list includes
mlflow-data,localstack-data,redis-databut these only exist in override (optional profiles). Base compose only definespostgres-dataanduser-data. - Lines 183-189: [STALE] LocalStack env config shows vars in
services/data-collection/.envbut they're actually set indocker-compose.override.yamlenvironment blocks. - Line 299: [WRONG-CMD]
BACKEND_PORT=8080 docker compose up backend-- Actual env var isHOST_BACKEND_PORT(per docker-compose.yaml:${HOST_BACKEND_PORT:-8000}:8000).BACKEND_PORTwould change the internal container port.
developer-guides/documentation.md¶
Runtime confirmed (devcontainer):
just docs-buildsucceeds (7.22s). Warning:templates/dryrun-signoff-checklist.mdreferenced in nav but excluded from built site.
- Line nav: [BUG]
templates/dryrun-signoff-checklist.mdin mkdocs.yml nav but excluded from build. Dead nav link. - Line 12: [GAP]
just docs-deployusesmkdocs gh-deploy(GitHub Pages) but CI deploys to Cloudflare Pages. Inconsistency between manual and CI deployment targets not explained. - Lines 37-42: [GAP] "Symlinked Content" table lists
libs/*/DESIGN.mdbut omits thatprepare-docs.shalso symlinksservices/*/DESIGN.md. Service DESIGN docs not mentioned. - Line 154: [MISLEADING]
from tradai.common import BaseService-- technically valid but presented without context. - Lines 220-227: [GAP] Trigger paths for auto-deploy omit
.github/workflows/docs.ymlwhich IS included in the actual workflow file. - Lines 229-233: [MISLEADING] "Manual Deployment" shows
just docs-deploywithout explaining it deploys to GitHub Pages while CI deploys to Cloudflare Pages -- different hosting destinations.
developer-guides/02-create-strategy.md¶
Runtime confirmed (devcontainer):
tradai strategy linttakes PATH not NAME.tradai strategy lint MyMomentumStrategywould fail -- needstradai strategy lint ./path/to/strategy/.
- Lines 99-121: [BUG] Generated structure tree shows
configs/tradai.yamlbut actual template placestradai.yamlat project root, not insideconfigs/. Also missing:freqai_training.jsonin configs,.pre-commit-config.yamlat root,{{cookiecutter.strategy_name}}.pyat root. - Lines 188-198: [MISLEADING] Uses
import pandas_ta as tawithta.ema(),ta.rsi()but framework's own examples and base class docs useimport talibwithtalib.RSI(),talib.EMA(). Inconsistent TA library usage. - Line 286: [BUG]
tradai strategy lint MyMomentumStrategy--lintcommand takes a PATH, not a strategy name. Should betradai strategy lint strategies/my_momentum_strategy/. - Line 335: [BUG] Test assertion
assert metadata.category.value == "momentum"-- withuse_enum_values=True,metadata.categoryis already the string"momentum", not an enum..valuewould fail. Should beassert metadata.category == "momentum". - Line 360: [MISLEADING]
just test-package strategies/my_momentum_strategy-- path depends on wheretradai strategy newwas run. - Line 372: [MISLEADING] Indicator CLI example uses
ta.RSI()(TA-Lib syntax) but strategy code examples use pandas_ta. No clarification of the difference. - Line 405: [BUG] Quick reference table shows
tradai strategy lint NAME-- should bePATH. - Cross-doc: [MISLEADING] Inconsistent TA library usage: strategy examples use
pandas_ta, indicator CLI usestalib.
developer-guides/03-develop.md¶
- Lines 12, 82-109, 184: [MISLEADING] Indicator tables and dev workflow use TA-Lib syntax (
ta.SMA,ta.RSI) which is correct for the CLI, but inconsistent with02-create-strategy.mdwhich uses pandas_ta. Never explained. - Line 200: [MISLEADING]
just test-package strategies/my_strategy-- path assumes strategy is understrategies/in workspace. - Line 244: [MISLEADING]
tradai strategy check PATH-- correct but table format is confusing.
developer-guides/04-backtest.md¶
- Lines 93-98: [WRONG-CMD]
tradai strategy backtest --strategy MyStrategy --start ... --end ...-- there is NOtradai strategy backtestcommand. Should usetradai backtest quickorjust run-backtest. - Line 297: [STALE]
code strategies/momentum_v2/src/momentum_v2/strategy.py-- assumes strategies live understrategies/in the workspace (separate repo convention).
developer-guides/05-validate.md¶
- Lines 342-358: [GAP] Imports
CheckSeverityfromtradai.strategy.validation_entitiesbut doesn't mention it's also available fromtradai.strategy.preflight.entities. - Lines 367-369: [MISLEADING]
SanityCheckService.check()takesBacktestMetrics(Pydantic model), not a raw dict. Doc showsbacktest_metricswithout specifying type. - Lines 371-382: [BUG] Doc shows
result.has_errors,result.error_countetc. fromValidationResultMixin, butSanityCheckResulthas fieldwarningsnotissues. The mixin's_get_issues()looks forself.issueswhich would return[]. Properties would all return empty/false. - Lines 384-392: [MISLEADING]
gate = CIBacktestGate(thresholds)--thresholdsmust beCIBacktestThresholds, not a plain dict. Doc should show constructing the proper type first.
developer-guides/06-optimize.md¶
- Lines 401-405: [MISLEADING] Troubleshooting suggests
uv pip install freqtradebut project uses UV workspaces. Should recommendjust setuporuv sync.
developer-guides/05-e2e-backtest-aws.md¶
No issues found.
developer-guides/06-e2e-backtest-scripts.md¶
No issues found.
developer-guides/strategy-lifecycle.md¶
Runtime confirmed (devcontainer): -
tradai strategy promote→No such command 'promote'.-tradai strategy rollback→No such command 'rollback'.-tradai strategy registertakes PATH +--env/--count, NOT name +--backtest-run-id/--docker-image-uri-just --list | grep backtest-smoke→ no match.backtest-smokeandbacktest-fulldo not exist.
- Lines 143-151: [WRONG-CMD]
just test momentum-strategy--just testtakesverboseandworkersargs, not a strategy name. "momentum-strategy" would be interpreted as theverboseparameter. Same issue on line 150 with-kflag. - Lines 190-191: [WRONG-CMD]
just lint momentum-strategy--just linttakes NO arguments (lints entire project). No per-strategy lint recipe exists. - Line 205: [WRONG-CMD]
just backtest-smoke momentum-strategy-- recipe does NOT exist in justfile. - Lines 211-213: [WRONG-CMD]
just backtest-full momentum-strategy,--timerange,--pairs-- recipes do NOT exist in justfile. - Line 280: [BUG]
tradai strategy register MomentumStrategy --backtest-run-id ... --docker-image-uri ...-- actualregistercommand takes a PATH (to strategy dir), not a name. Options are--envand--count, not--backtest-run-idor--docker-image-uri. Command signature is completely wrong. - Line 308: [MISLEADING]
tradai strategy stage-- correct command but doc omits--configoption. - Line 360: [WRONG-CMD]
tradai strategy promote MomentumStrategy --version 2-- NOpromotecommand exists. Closest istradai strategy set-version MomentumStrategy 2 --stage Production. - Line 389: [MISLEADING]
tradai deploy strategyarguments differ from actual CLI signature. - Line 460: [WRONG-CMD]
tradai strategy rollback MomentumStrategy --version 1-- NOrollbackcommand exists on strategy. Correct istradai deploy rollback MomentumStrategy --env dev.
strategy-templates.md¶
- Line 315: [MISLEADING]
just run-backtest mystrategy 1.0.0-- syntactically correct but requires strategy service to be running. - Line 328: [MISLEADING]
just test-package strategies/NAME-- assumes strategy is understrategies/in workspace. - Line 334: [GAP] Tips mention "Use
simplestructure first" buttradai strategy newhas no--structureoption. Only exposed throughtradai strategy wizardor direct cookiecutter.
developer-guides/07-deploy.md¶
Runtime confirmed (devcontainer):
tradai deploy strategy --helpshows--mode,--exchange-secret,--skip-live-checks,--skip-tests,--skip-checks,--skip-build,--dry-run,--force. Doc only covers a subset.
- Line 31: [GAP]
tradai deploy strategydocs are incomplete. Actual CLI has--mode/-moption (live vs dry-run) and--exchange-secretoption that are not documented. - Line 31: [GAP]
--skip-live-checks,--skip-tests,--skip-checks,--skip-build,--dry-run,--forceCLI options also not documented.
developer-guides/08-pulumi-deployment.md¶
- Line 142: [STALE] Claims
dynamodb.pyhas "8 DynamoDB tables" but actualDYNAMODB_TABLESinconfig.pydefines 12 tables. (The overview table on line 15 correctly says 12 -- internal inconsistency.) - Line 143: [STALE] Claims
ecr.pyhas "12 ECR repositories" but actualALL_ECR_REPOShas 24 repos (6 service + 18 lambda). (Overview table on line 15 correctly says 24.) - Line 114: [STALE] Claims staging uses "t4g.small RDS" but actual config.py has
db.t4g.microfor all non-prod. Only prod usesdb.t4g.small. - Line 209: [MISLEADING]
SERVICEScode snippet is oversimplified. Actual code uses conditional expressions (e.g.,desired_count: 1 if ENVIRONMENT != "prod" else 2).
developer-guides/pulumi-modules.md¶
- Line 47: [STALE] Claims compute stack has "18 container-image Lambdas" but compute defines only 17. The 18th (
update-nat-routes) is an inline runtime Lambda in the foundation stack. - Line 297: [MISLEADING] Lists
update-nat-routesas a container-image Lambda in compute stack. Actually: (a) it's an inline runtime Lambda usingruntime="python3.11", and (b) it's in the foundation stack (infra/foundation/modules/nat_instance.py). - Line 364: [STALE] Claims staging RDS uses
db.t4g.smallbut config.py setsdb.t4g.microfor all non-prod.
developer-guides/09-pulumi-operations.md¶
No issues found.
developer-guides/strategy-cicd.md¶
- Line 196: [GAP]
docs-freshness.ymlworkflow exists in.github/workflows/but is not listed in the "Other Workflows" table.
developer-guides/production-checklist.md¶
- Line 147: [WRONG-CMD]
cd infra && pulumi preview-- NoPulumi.yamlatinfra/root. Pulumi projects are in subdirs (infra/persistent/,infra/foundation/,infra/compute/,infra/edge/). Should usejust infra-preview devor cd into a specific stack. Same issue on lines 150 (pulumi up) and 153 (pulumi stack output). - Line 189: [WRONG-CMD]
pulumi stack export --stack prod > backup.jsonandpulumi up --target-replace-- Bare Pulumi commands need to run from a specific stack directory after sourcinginfra/.env. The justfile recipes handle this automatically. - Line 77: [MISLEADING] "No secrets in environment variables" -- Lines 230-241 show
MLFLOW_TRACKING_USERNAMEandMLFLOW_TRACKING_PASSWORDmarked as<from-secrets-manager>. Should clarify secrets are injected from Secrets Manager into env vars at runtime.
developer-guides/performance-tuning.md¶
- Line 18: [GAP]
tradai data sync --symbols BTC/USDT:USDT --timeframe 1h --days 365-- The exact flags (--timeframe,--days) could not be verified against the actual CLI function signature. - Line 68: [GAP]
tradai backtest --strategy {}-- Thetradai backtestsubcommand exists but a direct--strategyflag is not evidenced. CLI showstradai backtest show,tradai backtest compare, etc. - Line 87-88: [MISLEADING]
from tradai.data.infrastructure.repositories import AsyncCCXTRepository-- Import is correct but the code snippet's method call doesn't match the actualAsyncFetchRepositoryprotocol signature. - Line 108: [WRONG]
adapter.append(new_data, symbol)--ArcticAdapterhas noappendmethod. It hassave()andsave_batch(). - Line 114: [WRONG]
adapter.save(data, symbols, datetime.now(UTC), dedup=True)--ArcticAdapter.save()has nodedupparameter. Actual signature:save(self, data: OHLCVData, symbols: SymbolList, latest_query_date: datetime, timeframe: str | None = None). - Lines 125-131: [STALE]
from fastapi_cache.decorator import cache--fastapi-cacheis not a dependency in anypyproject.toml. Aspirational pattern not implemented. - Lines 139-143: [STALE]
SQLALCHEMY_POOL_SIZE,SQLALCHEMY_MAX_OVERFLOW,SQLALCHEMY_POOL_TIMEOUT-- These env var names are not used anywhere in the codebase. - Lines 370-378: [WRONG-CMD]
tradai benchmark --strategy MyStrategy --days 30-- Notradai benchmarkCLI command exists. Runtime:No such command 'benchmark'. - Line 385: [MISLEADING] Link to
04-backtest.mdworks but could be confused since the file is in a different context.
developer-guides/strategy-repo.md¶
- Line 98: [MISLEADING] Tag trigger
*-v*vs CLAUDE.md's<strategy>-v*-- Slightly inconsistent glob patterns (though functionally equivalent). All strategy-repo commands are for a separate repo and unverifiable here.
contributing.md¶
- Lines 19-21: [BUG]
git clone https://github.com/tradai-bot/tradai.gitthencd tradai-uv-- Cloningtradai.gitcreates directorytradai, nottradai-uv. Thecdcommand will fail. - Line 13: [MISLEADING] "Python 3.11+ (required)" --
pyproject.tomlspecifies>=3.11,<3.12(strictly 3.11.x). "3.11+" implies 3.12+ is acceptable. - Line 62: [MISLEADING] URL
https://github.com/tradai-bot/tradai/blob/main/CLAUDE.md-- repo nametradaivs local dirtradai-uvcould confuse readers. - Lines 188-189: [MISLEADING]
uv run pytest -m unitanduv run pytest -m integration-- Project standard says to always usejustcommands, not rawuv run pytest. - Lines 195-199: [GAP] Test markers table lists only 3 markers (unit, integration, slow) but the project has 14 registered markers in
pyproject.toml. - Lines 304-314: [WRONG]
from tradai.common.entities import DateRange, ExchangeConfig--DateRangeis NOT intradai.common; it's intradai.data.core.entities.DateRange.ExchangeConfigis correct. - Line 321: [GAP] GitHub Issues URL consistent with remote but may not match how users navigate.
- Lines 333-454: [GAP] "OpenCode Development" section has duplicated "Session Management" subsections (lines 397-407 and 419-431). Should be deduplicated.
- Lines 379-393: [MISLEADING] "Background Task Management" code block uses
background_task(),background_output()etc. as Python -- these are OpenCode-specific pseudo-code, not runnable Python.
Home + Architecture Docs Findings¶
index.md (Home)¶
- Line 125: [MISLEADING]
just setupdescription says "Install Python 3.11, UV, deps, pre-commit hooks" but UV must already be installed. Should say "Install Python 3.11, deps, pre-commit hooks".
architecture/index.md¶
No issues found.
architecture/overview.md¶
- Lines 12-15: [MISLEADING] Mermaid diagram shows
ALB --> Strategy ServiceandALB --> Data Collection. Both have emptyALB_PATH_PATTERNS-- they are internal-only services via Service Discovery. Arrows should go fromBackend, notALB.
architecture/02-ARCHITECTURE-OVERVIEW.md¶
No issues found. Service specs, Lambda counts, subnet CIDRs all verified.
architecture/03-VPC-NETWORKING.md¶
- Line 5: [STALE] TL;DR says "9 VPC endpoints" but actual is 11 (2 gateway + 9 interface). Body of doc correctly lists all 11.
architecture/04-SECURITY.md¶
No issues found. Cognito, IAM, S3 encryption, RDS, WAF, CloudTrail all verified.
architecture/05-SERVICES.md¶
No issues found. Service specs, ECR mappings, Lambda table, Docker Compose all verified.
architecture/06-STEP-FUNCTIONS.md¶
- Line 12: [BUG] Cross-reference says "05-SERVICES.md Section 6" but backtest execution modes are in Section 4. Section 6 is "Docker Compose".
architecture/07-COST-ANALYSIS.md¶
- Lines 10, 157-158: [MISLEADING] TL;DR and cost table say "add $28 for 4 interface endpoints" but body (Optimization 2) correctly lists 9 interface endpoints at ~$65.70/month. TL;DR contradicts body.
architecture/09-PULUMI-CODE.md¶
- Lines 428-429: [STALE] Says
infra/.envshould containAWS_PROFILE=tradai. The.env.examplesays AWS profile is set viapulumi config set aws:profile tradai, not env var.
architecture/10-CANONICAL-CONFIG.md¶
- Lines 125-131: [GAP] Service Discovery table lists only 3 services but
config.pydefines 7. At minimumstrategy-serviceis missing. - Line 379: [BUG]
update-nat-routesLambda timeout listed as 30s but actual code usestimeout=120.
architecture/11-LIVE-TRADING.md¶
- Line 755: [MISLEADING] Example uses
curlfor health check but 05-SERVICES.md documents ECS usespython -c "import httpx..."(Alpine lacks curl). Section is marked aspirational.
architecture/12-ML-LIFECYCLE.md¶
No issues found. All 21 source file paths, Lambda handlers, and class references verified.
architecture/adr/index.md¶
- Line 8: [GAP] ADR-002 through ADR-007 listed in table but no
.mdfiles exist. Only001-nat-instance.mdexists.
architecture/adr/001-nat-instance.md¶
- Line 34: [MISLEADING] Claims "saving ~$64/month" but code docstring says "~$32/month savings". Different baselines.
design/index.md¶
- Lines 6, 11-13: [WRONG] Claims DESIGN docs are "10k-15k lines each". Actual: tradai-common=756, tradai-data=809, tradai-strategy=660 lines. Off by 10x.
design/tradai-common-design.md¶
- Line 258: [WRONG-PATH] Lists
settings.pybut actual file isbase_settings.py. - Lines 254-392: [GAP] Module tree omits many files:
_optional.py,base_service.py,cli.py,events.py,factories.py,runtime.py, and severalaws/andclients/files. - Line 334: [MISLEADING] Says
config/catalog.pyis "StrategyConfig schema" butStrategyConfigis inconfig/loader.py.
design/tradai-data-design.md¶
- Lines 17, 127, 141, 503, 601, 725: [STALE] Says "ABC" throughout but actual code uses
Protocol. 6 occurrences. - Lines 466-475: [STALE] Claims "ArcticAdapter (Future)" but it's fully implemented (233+ lines).
- Line 678: [BUG] Constructor example
ArcticAdapter(bucket_name="my-bucket", library="futures")-- actual params arebucketandlibrary_name.
design/tradai-strategy-design.md¶
- Lines 96-141: [GAP] Module tree omits
checks.py. All other references verified correct.
design/backend-design.md¶
- Line 24: [WRONG] Says
BacktestServicebut actual class isBackendService. - Line 98: [WRONG] Env var
BACKEND_SQS_QUEUE_URL-- actual isBACKEND_BACKTEST_QUEUE_URL. - Line 99: [WRONG] Env var
BACKEND_DYNAMODB_TABLE-- actual isBACKEND_DYNAMODB_TABLE_NAME.
design/data-collection-design.md¶
- Line 35: [STALE] Claims
FreshnessCheckentity -- doesn't exist. - Line 36: [STALE] Claims
FreshnessStatusentity -- doesn't exist. - Line 32: [GAP] Omits
/exportendpoint.
design/strategy-service-design.md¶
- Line 25: [WRONG] Says
StrategyServicebut actual class isStrategyServiceService. - Line 86: [WRONG] MLflow URI default listed as
http://localhost:5000but actual ishttp://localhost:5001. - Line 87: [WRONG] Env var
STRATEGY_SERVICE_STRATEGIES_DIRwith defaultstrategies/-- actual isSTRATEGY_SERVICE_STRATEGY_PATHwith default"".
design/mlflow-design.md¶
No issues found.
Architecture App-Architecture Docs Findings¶
architecture/13-DATA-FLOW-ARCHITECTURE.md¶
- Line 66: [MISLEADING] Conflates
BacktestJobSubmitterProtocol withExecutorStrategypattern -- these are two separate abstractions in the codebase. - Line 167: [WRONG] References
LibraryDataCollectionServiceandLibraryAsyncDataCollectionService-- actual class names areDataCollectionServiceandAsyncDataCollectionService(noLibraryprefix).
architecture/14-STATE-MACHINES.md¶
No issues found. All enum states, values, transitions verified.
architecture/15-ERROR-HANDLING.md¶
No issues found. Exception hierarchy and resilience presets verified.
architecture/16-OBSERVABILITY.md¶
No issues found. All class names, file paths, logger format verified.
architecture/17-CONFIGURATION-MANAGEMENT.md¶
No issues found. All paths, classes, entity fields verified.
architecture/18-CI-CD-PIPELINE.md¶
- Line 18: [WRONG] CI schedule shown as "Weekly / Sunday" but actual cron is
0 6 * * 1= Monday 06:00 UTC. - Line 86: [STALE] Docs Freshness trigger listed as "scheduled, dispatch" but also triggers on push to main for docs paths.
- Workflow files: [STALE]
docker-build.ymlandpublish-libs.ymlcontain Bitbucket references in comments (deprecated).
architecture/19-TESTING-STRATEGY.md¶
- Line 107: [WRONG]
just test-strictcomment says "fails if < 80%" but actualpyproject.tomlenforcesfail_under = 60. - Lines 196-199: [WRONG] Claims "80% minimum enforced via
--cov-fail-under" but 80% is a roadmap target. Actual enforcement is 60%.
architecture/20-DEPLOYMENT-PIPELINE.md¶
No issues found. All commands, Lambda counts, cross-references verified.
Reference: Libraries + Services Findings¶
reference/index.md¶
- Line 31: [BUG]
from tradai.data import OHLCVRepository-- doesn't exist. Actual:DataRepository(Protocol),CCXTRepository.
libs/index.md¶
- Lines 17-26: [MISLEADING] Directory tree implies all libs follow 3-layer pattern (api/core/infrastructure). Only services do. Libs have varied structures.
libs/tradai-common.md¶
No issues found.
libs/tradai-data.md¶
- Line 33: [BUG]
ArcticAdapter(bucket_name="my-bucket", library="futures")-- actual params:bucket,library_name.
libs/tradai-strategy.md¶
No issues found.
libs/DESIGN.md¶
No issues found.
services/index.md¶
No issues found.
services/backend.md¶
- Line 195: [BUG]
BACKEND_EXECUTOR_MODEdefault documented aslocalbut actual default issqs. - Lines 240-241: [WRONG-PATH]
infrastructure/dynamodb_repository.py,infrastructure/sqs_executor.pydon't exist. Actual:executor_factory.py,local.py,memory.py,sqs.py. - Lines 229-245: [GAP] Architecture listing incomplete -- missing many api/ and core/ files.
services/data-collection.md¶
No issues found.
services/strategy-service.md¶
- Lines 24-27: [WRONG-CMD] CLI shown as
strategy-service serve(hyphen). Actual entry point:strategy_service(underscore). - Line 249: [BUG]
--cov=strategy_serviceshould be--cov=tradai.strategy_service. - Line 252: [WRONG-PATH]
tests/unit/test_service.pydoesn't exist. Actual:test_strategy_service.pyortest_core_service.py. - Lines 260-272: [GAP] Architecture listing severely incomplete -- missing many routes, services, schemas.
- Lines 277-295: [STALE]
BacktestHandlerdescribed as in strategy-service but it's intradai.common.entrypoint.handlers.TradingMode.BACKTESTshould beExecutionMode.BACKTEST.
services/mlflow.md¶
- Line 73: [WRONG-PATH]
from tradai.common.mlflow_adapter import MLflowAdapter-- actual:from tradai.common.mlflow.adapter import MLflowAdapter. - Line 91: [MISLEADING] Health URL
localhost:5001/mlflow/health-- static prefix only applies behind ALB. From host:localhost:5001/health.
Reference: Lambda Docs Findings¶
reference/lambdas/index.md¶
- Line 10: [BUG]
@lambda_handlershown without settings arg. Actual usage:@lambda_handler(SettingsClass). - Line 38: [BUG] model-rollback trigger listed as "CloudWatch Alarm" but IaC configures it as Step Functions/Direct invocation.
- Line 127: [WRONG-PATH]
infra/modules/lambda_funcs.py-> actual:infra/compute/modules/lambda_funcs.py - Line 148: [WRONG-PATH]
infra/modules/iam.py-> actual: IAM policy is ininfra/compute/modules/lambda_funcs.py
Lambda timeout/memory mismatches (13 of 17 docs wrong)¶
| Lambda | Doc timeout | Actual | Doc memory | Actual |
|---|---|---|---|---|
| backtest-consumer | 300s | 30s | - | - |
| check-retraining-needed | 60s | 30s | - | - |
| cleanup-resources | 120s | 60s | - | - |
| compare-models | - | - | 256MB | 512MB |
| data-collection-proxy | 60s | 180s | 128MB | 256MB |
| drift-monitor | 300s | 120s | - | - |
| model-rollback | 120s | 60s | - | - |
| orphan-scanner | 300s | 60s | 256MB | 128MB |
| promote-model | 120s | 60s | - | - |
| retraining-scheduler | 300s | 60s | 512MB | 256MB |
| sqs-consumer | 300s | 30s | - | - |
| validate-strategy | 60s | 30s | - | - |
Lambda schedule mismatches (3 docs wrong)¶
| Lambda | Doc schedule | Actual |
|---|---|---|
| drift-monitor | rate(6 hours) | rate(12 hours) |
| health-check | rate(5 minutes) | rate(2 minutes) |
| orphan-scanner | rate(6 hours) | rate(5 minutes) |
| trading-heartbeat-check | rate(1 minute) | rate(5 minutes) |
Lambda env var name mismatches (2 docs)¶
- model-rollback.md, notify-completion.md:
ALERT_SNS_TOPIC_ARN-> actual:SNS_ALERTS_TOPIC_ARN
Clean Lambda docs (2 of 18)¶
- pulumi-drift-detector.md, update-status.md: No issues.
Reference: SDK + API + Misc Findings¶
reference/sdk/tradai-common.md¶
- Line 270: [BUG]
MLflowAdapter(tracking_uri=...)-- actual param isbase_url, nottracking_uri.
reference/sdk/tradai-data.md¶
- Lines 229, 303, 434: [STALE]
library_name="futures"should be"ohlcv"(3 occurrences).
reference/sdk/tradai-strategy.md¶
- Line 436: [WRONG-CMD]
tradai strategy gatedoesn't exist. Correct:tradai validate gate.
reference/cli.md¶
- Lines 578-658: [GAP] Entire
tradai datacommand group documented but these commands are in the data-collection service CLI, not aggregated into roottradaiCLI. Thetradai datasubcommand only appears whentradai-data-collectionpackage is installed (lazy-loaded).
reference/environment.md¶
- Line 237: [MISLEADING] Exchange JSON uses
"market_type": "futures"butExchangeConfigfield istrading_mode.market_typeis silently ignored by Pydantic.
Clean docs (8 of 13)¶
- reference/sdk/index.md, api-docs/index.md, api-docs/common-entities.md, api-docs/data-entities.md, exchange-connectivity.md, arcticdb-data-model.md, api.md, glossary.md: No issues.
Operations: Runbooks Findings¶
runbooks/index.md¶
- Line 34: [WRONG-CMD] SNS topic names wrong: doc says
tradai-{env}-alertsbut actual istradai-alerts-{env}. Second topic istradai-registration-{env}nottradai-{env}-notifications.
runbooks/service-recovery.md¶
- Line 39: [WRONG-PATH] Log group
/ecs/tradai-${SERVICE_NAME}-${ENVIRONMENT}wrong. Actual:/ecs/tradai/${ENVIRONMENT}/serviceswith stream prefix. - Line 230: [MISLEADING]
rollback_statetable key ismodel_namenotservice_name.
runbooks/model-drift-response.md¶
- Lines 128, 136: [MISLEADING] MLflow port 5001 is local dev only, not clarified.
runbooks/trading-issues.md¶
No issues found.
runbooks/infrastructure-issues.md¶
No issues found.
runbooks/database-operations.md¶
- Line 35: [MISLEADING]
MultiAZStatusshould beMultiAZfor single-instance RDS. - Line 318: [BUG]
get-itemmissingstrategy_namepartition key (table has composite key). - Line 359: [BUG]
status-indexGSI partition key isstrategy_namenotstatus.
runbooks/log-investigation.md¶
- Line 35: [WRONG-PATH] VPC flow logs:
/aws/vpc/flowlogs/tradai-{env}-> actual:/aws/vpc/tradai-flow-logs. - Line 36: [WRONG-PATH] CloudTrail:
/aws/cloudtrail/tradai-{env}-> actual:/aws/cloudtrail/tradai. - Line 33: [GAP] API Gateway log group may not exist (no access logging in infra code).
runbooks/performance-degradation.md¶
- Lines 294, 302: [WRONG-PATH] Strategy log group:
/ecs/tradai-strategy-${ENV}-> actual:/ecs/tradai/${ENV}. - Lines 327, 340: [WRONG-PATH] Data collection log group format wrong. Actual:
/ecs/tradai/${ENV}/serviceswith stream prefix.
runbooks/security-incidents.md¶
- Lines 199, 251, 258: [WRONG-PATH] VPC flow logs path wrong (same as log-investigation).
- Line 234: [WRONG-PATH] ECS service log group format wrong.
runbooks/debug-workflows.md¶
- Line 27: [BUG] DynamoDB key
job_idshould berun_id(workflow-state table partition key). - Line 65: [BUG] State machine name
tradai-${ENV}-backtest-> actual:tradai-backtest-workflow-${ENV}.
Operations: Testing + Troubleshooting Findings¶
testing-in-aws.md¶
No critical issues found.
ai/worktree-testing.md¶
- Line 34/44: [GAP] PYTHONPATH missing
$WT/infra/persistent(it's a Python package withpyproject.toml).
troubleshooting/index.md¶
No critical issues found.
troubleshooting/common-issues.md¶
- Line 213: [WRONG-PATH]
configs/strategies/directory doesn't exist. - Lines 217, 220: [WRONG-CMD] S3 bucket
tradai-${ENV}-configs-> actual:tradai-configs-${ENV}. - Line 235: [WRONG-CMD]
tradai strategy validate configs/my-strategy.json-- takes directory/file path, not JSON. - Line 264: [WRONG-CMD]
pip list-> should beuv pip list. - Line 314: [WRONG-CMD]
tradai data sync --symbol BTC/USDT:USDT-> symbols are positional:tradai data sync BTC/USDT:USDT. - Line 319: [WRONG-CMD]
tradai data checkdoesn't exist ->tradai data check-freshness. - Line 336: [WRONG-CMD]
tradai data symbols->tradai data list-symbols. - Line 339: [WRONG-CMD]
tradai data infodoesn't exist. - Line 348: [WRONG-CMD] ArcticDB bucket
tradai-arcticdb-local-> actual:tradai-arcticdb-dev. - Line 490: [WRONG-CMD]
tradai strategy new --ml freqai MyMLStrategy-> name is positional first:tradai strategy new MyMLStrategy --ml freqai. - Lines 518-519: [WRONG-CMD]
tradai backtest --local/tradai backtestdon't exist ->tradai backtest quick <strategy> [--local].
troubleshooting/debug-workflows.md¶
- Lines 108, 111: [WRONG-CMD] S3 bucket
tradai-${ENV}-results-> actual:tradai-results-${ENV}. - Line 205: [MISLEADING] Lambda name should be
backtest-consumernotsqs-consumerin backtest context. - Line 386: [WRONG-CMD] State machine
tradai-${ENV}-backtest-> actual:tradai-backtest-workflow-${ENV}.
troubleshooting/service-interactions.md¶
- Lines 126, 173-178: [WRONG-CMD] ArcticDB shown as LMDB backend (
lmdb://./user_data/arcticdb) but service uses S3 storage. - Line 187: [WRONG-CMD] S3 bucket
tradai-${ENV}-arcticdb-> actual:tradai-arcticdb-${ENV}. - Line 249: [WRONG-CMD] Lambda
heartbeat-check-> actual:trading-heartbeat-check. - Lines 311, 320: [WRONG-CMD] S3 bucket name pattern wrong (same as common-issues).
- Line 386: [WRONG-CMD] State machine name wrong (same as debug-workflows).
templates/dryrun-signoff-checklist.md¶
No issues found.
Cross-cutting: S3 bucket naming pattern¶
8 occurrences across 3 docs use tradai-${ENV}-<type> but actual pattern is tradai-<type>-${ENV}.
Overall Summary¶
By Severity¶
| Severity | Count | Description |
|---|---|---|
| BUG | 12 | Commands that fail, wrong imports, broken clone+cd |
| WRONG-CMD | 16 | Non-existent CLI commands or just recipes |
| STALE | 14 | Outdated counts, default values, output formats |
| MISLEADING | 22 | Technically works but confuses readers |
| GAP | 12 | Missing prerequisites, incomplete tables/trees |
| WRONG-PATH | 0 | All file cross-references verified OK |
Total issues: ~80 across 25 guides (3 guides clean)
Top 5 Most Problematic Docs¶
| Rank | Guide | Issues | Key Problems |
|---|---|---|---|
| 1 | strategy-lifecycle.md | 12 | Invented just recipes, wrong CLI signatures, non-existent commands |
| 2 | docker-setup.md | 9 | Missing .env.docker, wrong ports, stale Dockerfiles, wrong env vars |
| 3 | performance-tuning.md | 9 | Non-existent methods, stale deps, fake CLI commands |
| 4 | contributing.md | 9 | Broken clone+cd, wrong import, incomplete markers, duplication |
| 5 | 02-create-strategy.md | 8 | Wrong file tree, wrong lint syntax, mixed TA libs |
Cross-Cutting Issues¶
- Git clone URL: Multiple docs use
git clone .../tradai.gitthencd tradai-- but local directory is oftentradai-uv. Affects: 01-setup.md, docker-setup.md, contributing.md tradai strategy backtestdoesn't exist: Referenced in 01-your-first-backtest.md and 04-backtest.md. Should betradai backtest quickortradai strategy-service backtest.- TA library inconsistency: Strategy examples use
pandas_ta, indicator CLI usestalib. Never explained. Affects: 02-create-strategy.md, 03-develop.md, 04-backtest.md strategies/path assumption: Multiple docs assume strategies live understrategies/buttradai strategy newoutputs to CWD. Affects: 02-create-strategy.md, 03-develop.md, strategy-lifecycle.md, strategy-templates.md- ArcticDB library name: Default is
ohlcvbut docs sayfutures. Affects: 03-collect-market-data.md (3 occurrences) - Pulumi bare commands: Several docs show
pulumi preview/pulumi upwithout specifying which stack directory. Affects: production-checklist.md - Non-existent strategy subcommands:
promote,rollbackreferenced in strategy-lifecycle.md but don't exist at all tradai benchmarkreferenced in performance-tuning.md but doesn't existtradai strategy newprerequisite: Must run from repo root or setTRADAI_ROOT-- never documented
Runtime Validation Log (Devcontainer)¶
Commands executed inside devcontainer (devcontainer exec --workspace-folder .):
| Command | Result | Guide |
|---|---|---|
just setup | PASS (4/4 steps) | 01-setup.md |
just doctor | PASS (output format differs from docs) | 01-setup.md |
just ps | PASS | docker-setup.md |
curl localhost:8000/api/v1/health | PASS (healthy) | docker-setup.md |
curl localhost:8002/api/v1/health | PASS (healthy) | docker-setup.md |
curl localhost:8003/api/v1/health | PASS (healthy) | docker-setup.md |
curl localhost:5001/health | PASS (OK) | docker-setup.md |
tradai --help | PASS (all subcommands listed) | 01-setup.md |
tradai strategy new ... -y -o /tmp | PASS (17 files generated) | QS02 |
tradai strategy backtest --help | FAIL: No such command 'backtest' | QS01, 04-backtest |
tradai backtest quick --help | PASS | QS01 |
tradai strategy lint --help | PASS (takes PATH not NAME) | 02-create-strategy |
tradai strategy promote --help | FAIL: No such command 'promote' | strategy-lifecycle |
tradai strategy rollback --help | FAIL: No such command 'rollback' | strategy-lifecycle |
tradai strategy register --help | PASS (takes PATH + --env/--count) | strategy-lifecycle |
tradai benchmark --help | FAIL: No such command 'benchmark' | performance-tuning |
tradai deploy strategy --help | PASS (many undocumented flags) | 07-deploy |
tradai validate preflight --help | PASS | 05-validate |
tradai data sync --help | PASS (--timeframe, --days, --incremental verified) | QS03 |
tradai data list-symbols --help | PASS | QS03 |
tradai data check-freshness --help | PASS | QS03 |
tradai indicator test --help | PASS | 03-develop |
just lint | PASS | contributing |
just docs-build | PASS (warns: dryrun-signoff-checklist excluded) | documentation |
just --list \| grep backtest-smoke | FAIL: no match (recipe doesn't exist) | strategy-lifecycle |