@@ -23,8 +23,6 @@ missing trading plan.
2323
2424> Paper trading only. OpenAlphaStack does not place real orders and does not promise investment returns.
2525
26- ![ OpenAlphaStack Dashboard] ( docs/assets/dashboard-workbench.jpg )
27-
2826## Why OpenAlphaStack?
2927
3028- ** One plugin, two extension layers** — package reusable domain Skills and a
@@ -78,10 +76,22 @@ Requirements:
7876``` powershell
7977git clone https://github.com/44-99/OpenAlphaStack.git
8078cd OpenAlphaStack
81- pip install -r requirements.txt
8279pip install -e .
80+ openalphastack doctor
81+ ```
82+
83+ The base install supports the Codex plugin, MCP contracts, and offline Demo path.
84+ Install only the surfaces you use:
85+
86+ ``` powershell
87+ pip install -e ".[market]" # AkShare-backed market providers
88+ pip install -e ".[engine]" # paper/backtest Parquet runtime
89+ pip install -e ".[dashboard]" # FastAPI Dashboard
90+ pip install -e ".[all]" # complete local development runtime
91+
8392npm install
8493npm run dashboard:build
94+ openalphastack doctor
8595openalphastack app start
8696```
8797
@@ -94,6 +104,22 @@ Use $market-analyzer to assess today's A-share market, cite the MCP data used,
94104and finish with risks and invalidation conditions.
95105```
96106
107+ ### Offline first run
108+
109+ Market providers may be unavailable outside trading hours or behind a restricted
110+ network. To verify the complete Skill → MCP path without treating sample values
111+ as market facts, ask Codex:
112+
113+ ``` text
114+ Use $market-analyzer in offline demo mode. Read the market_overview and
115+ market_news demo datasets, show their schema version, source, as-of time and
116+ freshness status, then produce a short report clearly labelled as synthetic data.
117+ ```
118+
119+ The ` read_demo_dataset ` MCP tool is read-only and deterministic. Skills must not
120+ publish Demo-derived values into a paper plan. Available datasets cover market
121+ overview, screening, quote, technical, fundamentals, news and a baseline backtest.
122+
97123The repository is also a Codex plugin: ` .codex-plugin/plugin.json ` discovers the
98124Skills and ` .mcp.json ` registers the stdio server. After installing the Python
99125package, install/open the plugin in Codex and verify the ` open-alpha-stack ` MCP
@@ -105,6 +131,13 @@ Start the MCP server manually for diagnostics:
105131openalphastack mcp serve
106132```
107133
134+ Check the local installation at any time:
135+
136+ ``` powershell
137+ openalphastack doctor
138+ openalphastack doctor --json
139+ ```
140+
108141## Codex Skills
109142
110143- ` $market-analyzer ` : market environment, sentiment, sectors, and leaders.
@@ -121,13 +154,35 @@ Codex Desktop to remain running.
121154Read tools expose paper/backtest runs, market data, indicators, news, screens,
122155risk calculations, and deterministic baseline backtests.
123156
157+ Every MCP tool returns a versioned envelope:
158+
159+ ``` json
160+ {
161+ "schema_version" : " openalphastack.mcp/v1" ,
162+ "ok" : true ,
163+ "data" : {},
164+ "meta" : {
165+ "source" : " provider-or-demo-dataset" ,
166+ "as_of" : " 2026-07-23T10:00:00+08:00" ,
167+ "freshness" : {"status" : " fresh" },
168+ "demo" : false
169+ }
170+ }
171+ ```
172+
173+ Callers must check ` ok ` before reading ` data ` . Failures use a stable
174+ ` error.code ` and do not expose provider exception text. JSON schemas are
175+ available through ` get_contracts ` and ` openalphastack://contracts/v1 ` .
176+
124177The only plan mutations are:
125178
1261791 . ` save_plan_draft ` — writes a non-executable ` plan.codex-draft.json ` .
1271802 . ` publish_paper_plan ` — validates, requires an idempotency key, checks the
128181 expected plan version, and atomically updates a paper run only.
129182
130- Live runs are hidden from MCP mutations. No shell, arbitrary file-write, or live-order tool is exposed.
183+ There is no public live mode: the CLI cannot start or resume one, and MCP has no
184+ live-order tool. Historical ` live_* ` directories remain read-only for migration
185+ and audit. No shell or arbitrary file-write tool is exposed.
131186
132187## Engine commands
133188
@@ -146,6 +201,16 @@ The paper engine can stay running outside trading hours. It idles according to
146201the trading calendar and remains observation-only until Codex publishes a valid
147202plan for the current date.
148203
204+ Each run uses ` run.sqlite3 ` as the transactional source of truth for account
205+ state, the active plan, and ledger events. ` state.json ` , ` plan.json ` , and
206+ ` ledger.jsonl ` are human-readable projections. A trade updates account state and
207+ its matching ledger event in one SQLite transaction.
208+
209+ Backtests require real cached or provider minute bars. Missing intraday data now
210+ fails closed instead of fabricating bars from daily OHLC. Backtest output remains
211+ experimental evidence—not a profitability claim—until walk-forward,
212+ out-of-sample, and baseline comparisons are implemented.
213+
149214## Verification
150215
151216``` powershell
0 commit comments