# AGENTS.md ## Repository and validation - Stage-mode HAR `@b2c/first_page`: main module `biz_firstpage`, with a separate `src/ohosTest` Hypium test module. Root `Index.ets` is the host-facing export surface. - This checkout is not independently runnable: `hvigorfile.ts` defines HAR tasks, but `hvigorw`, `oh_modules`, and sibling `../biz_quote` are absent. Sources also use host-provided modules beyond the root manifest's `biz_quote` and theme-manager dependencies. - Do not claim local build or test success, add host dependencies, or invent standalone commands. Validate integration, including `src/ohosTest` scaffolding where applicable, in the host project. ## Feed wiring - Export new host-facing symbols from root `Index.ets`. - A normal feed card needs a datacenter `FirstPageConstant.KEY_*`, model insertion, and a `FirstPage.createNodeView` dispatch branch; metadata normally comes from `src/main/resources/rawfile/first_page_cards_config.json`. - `market-ranking` is special: `FirstPage` inserts and renders it directly under `KEY_MARKET_RANKING`; its loader config key is `marketRanking`. - The two `FirstPageConstant.ets` files differ: `datacenter/` defines card `KEY_*` values; `util/` exports `TITLE_BAR_HEIGHT` only. ## Market ranking - Keep the two-stage data path: `MarketRankingDataFetcher` obtains recommended contracts through `@kit.NetworkKit`, then `MarketRankingHqRequestClient` subscribes them through the host `TableRequestClient`/4106 path. Do not substitute mock data or another quote client. - `MarketRankingConstant.ets` couples UI labels, HTTP parameters, and 4106 fields in `TAB_METRICS` and `PERIOD_RANGES`; update ordering, IDs, and child-tab semantics together. - Keep 4106 frame `2201`, scenario `qht_qihuo_sort`, and `pushtime=2.5` aligned with the subscription path. Release subscriptions on invisibility, tab changes, refresh, and destruction; reconstruct on TCP reconnect from the original HTTP contract list. - Preserve HTTP/quote request and subscription version guards. Preserve contract, market, and name ordering when rows call host `jumpToQuote()`. - Validate 4106 IDs and standard-price fields, HTTP environment/auth, lifecycle/reconnect behavior, and quote routing in the host; see `doc/market-ranking-known-issues.md` before changing this area. ## Resources and release - Put user-facing text in `src/main/resources/{base,zh_CN,en_US}/element/string.json`; use `$r('app.color.*')` with light/dark qualifiers rather than hardcoded theme colors. - Keep `FirstPageDebugUtil.isMarketRankingUseTestUrl` and other test-URL switches `false` in commits. - Preserve existing root/deep `biz_quote` import style. For public or reflective symbols, account for release ArkGuard rules in `obfuscation-rules.txt` and `consumer-rules.txt`.